-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure that rc5 doesn't try to use a key longer than 2040 bits #8834
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,26 @@ EVP_rc5_32_12_16_ofb() | |
|
||
RC5 encryption algorithm in CBC, CFB, ECB and OFB modes respectively. This is a | ||
variable key length cipher with an additional "number of rounds" parameter. By | ||
default the key length is set to 128 bits and 12 rounds. | ||
default the key length is set to 128 bits and 12 rounds. Alternative key lengths | ||
can be set using L<EVP_CIPHER_CTX_set_key_length(3)>. The maximum key length is | ||
2040 bits. | ||
|
||
The following rc5 specific I<ctrl>s are supported (see | ||
L<EVP_CIPHER_CTX_ctrl(3)>). | ||
|
||
=over 4 | ||
|
||
=item EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC5_ROUNDS, rounds, NULL) | ||
|
||
Sets the number of rounds to B<rounds>. This must be one of RC5_8_ROUNDS, | ||
RC5_12_ROUNDS or RC5_16_ROUNDS. | ||
|
||
=item EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GET_RC5_ROUNDS, 0, &rounds) | ||
|
||
Stores the number of rounds currently configured in B<*rounds> where B<rounds> | ||
is an int. | ||
|
||
=back | ||
|
||
=back | ||
|
||
|
@@ -43,10 +62,6 @@ These functions return an B<EVP_CIPHER> structure that contains the | |
implementation of the symmetric cipher. See L<EVP_CIPHER_meth_new(3)> for | ||
details of the B<EVP_CIPHER> structure. | ||
|
||
=head1 BUGS | ||
|
||
Currently the number of rounds in RC5 can only be set to 8, 12 or 16. | ||
This is a limitation of the current RC5 code rather than the EVP interface. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still seems to be the case. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but I documented the restriction of 8, 12 or 16 in the section on the EVP_CTRL_SET_RC5_ROUNDS ctrl. I didn't see this as a "bug" so the writing it in a bugs section seemed misplaced. The fact that its a limitation of the rc5 code rather than the evp interface is an implementation detail that doesn't seem relevant to the end user. |
||
|
||
=head1 SEE ALSO | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the second be *rounds too?
Alternatively, say it is a pointer to an int.