You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.
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,
The text was updated successfully, but these errors were encountered: