I think this is bug! my code is rv5223, in ismacryp.c I think this function "gf_cenc_encrypt_sample_cbc":
ret = samp->dataLength % 16;
if (ret) {
gf_bs_write_data(cyphertext_bs, buffer, ret);
}
if (samp->dataLength >= 16) {
gf_crypt_encrypt(mc, buffer, samp->dataLength);
gf_bs_write_data(cyphertext_bs, buffer, samp->dataLength);
}
should be modified
ret = samp->dataLength % 16;
if (ret) {
gf_bs_write_data(cyphertext_bs, buffer, ret);
}
if (samp->dataLength >= 16) {
gf_crypt_encrypt(mc, buffer+ret, samp->dataLength-ret);
gf_bs_write_data(cyphertext_bs, buffer+ret, samp->dataLength-ret);
}
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think this is bug! my code is rv5223, in ismacryp.c I think this function "gf_cenc_encrypt_sample_cbc":
ret = samp->dataLength % 16;
if (ret) {
gf_bs_write_data(cyphertext_bs, buffer, ret);
}
if (samp->dataLength >= 16) {
gf_crypt_encrypt(mc, buffer, samp->dataLength);
gf_bs_write_data(cyphertext_bs, buffer, samp->dataLength);
}
should be modified
ret = samp->dataLength % 16;
if (ret) {
gf_bs_write_data(cyphertext_bs, buffer, ret);
}
if (samp->dataLength >= 16) {
gf_crypt_encrypt(mc, buffer+ret, samp->dataLength-ret);
gf_bs_write_data(cyphertext_bs, buffer+ret, samp->dataLength-ret);
}
thanks
rv5248 is the same!