The following code is the class of RSAEngine. There is problem for the code:
// line 25
int get inputBlockSize {
if (_key == null) {
throw new StateError(
"Input block size cannot be calculated until init() called");
}
var bitSize = _key.modulus.bitLength;
if (_forEncryption) {
return ((bitSize + 7) ~/ 8) - 1; // why is not (bitSize ~/ 8) - 11;
} else {
return (bitSize + 7) ~/ 8; // why is not bitSize ~/ 8
}
}
// line 41
int get outputBlockSize {
if (_key == null) {
throw new StateError(
"Output block size cannot be calculated until init() called");
}
var bitSize = _key.modulus.bitLength;
if (_forEncryption) {
return (bitSize + 7) ~/ 8; // why is not bitSize ~/ 8
} else {
return ((bitSize + 7) ~/ 8) - 1; //why is not (bitSize ~/ 8) - 11;
}
}
when Encryp the inputBlockSize is ((bitSize + 7) ~/ 8) - 1; why is not (bitSize ~/ 8) - 11;
The following code is about block encryption,
in this example: when the length of the bits of the encrypted string over 117 bits, Decrypt ERORR. Why?
For example,
The following code is the class of RSAEngine. There is problem for the code:
when Encryp the inputBlockSize is ((bitSize + 7) ~/ 8) - 1; why is not (bitSize ~/ 8) - 11;
The following code is about block encryption,
in this example: when the length of the bits of the encrypted string over 117 bits, Decrypt ERORR. Why? For example,