Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
cd476a5e
Commit
cd476a5e
authored
Feb 16, 2018
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CAST128/CAST5 docs. Inconsistencies spotted by Henrik Rindlöw.
parent
b908c40a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
9 deletions
+25
-9
ChangeLog
ChangeLog
+5
-0
nettle.texinfo
nettle.texinfo
+20
-9
No files found.
ChangeLog
View file @
cd476a5e
2018-02-16 Niels Möller <nisse@lysator.liu.se>
* nettle.texinfo (Cipher functions): Update CAST128/CAST5 docs.
Inconsistencies spotted by Henrik Rindlöw.
2018-02-10 Niels Möller <nisse@lysator.liu.se>
2018-02-10 Niels Möller <nisse@lysator.liu.se>
* configure.ac: New configure option --enable-x86-sha-ni.
* configure.ac: New configure option --enable-x86-sha-ni.
...
...
nettle.texinfo
View file @
cd476a5e
...
@@ -1461,8 +1461,12 @@ more than one block, the data is processed in ECB mode. @code{src} and
...
@@ -1461,8 +1461,12 @@ more than one block, the data is processed in ECB mode. @code{src} and
@subsection CAST128
@subsection CAST128
CAST-128 is a block cipher, specified in @cite
{
RFC 2144
}
. It uses a 64
CAST-128 is a block cipher, specified in @cite
{
RFC 2144
}
. It uses a 64
bit (8 octets) block size, and a variable key size of up to 128 bits.
bit (8 octets) block size, and a key size of 128 bits. It is possible,
Nettle defines cast128 in @file
{
<nettle/cast128.h>
}
.
but discouraged, to use the same algorithm with shorter keys. Nettle
refers to the variant with variable key size as CAST-5. Keys for CAST-5
are zero padded to 128 bits, and with very short keys, less than 80
bits, encryption also uses fewer rounds than CAST128. Nettle defines
cast128 in @file
{
<nettle/cast128.h>
}
.
@deftp
{
Context struct
}
{
struct cast128
_
ctx
}
@deftp
{
Context struct
}
{
struct cast128
_
ctx
}
@end deftp
@end deftp
...
@@ -1471,19 +1475,20 @@ Nettle defines cast128 in @file{<nettle/cast128.h>}.
...
@@ -1471,19 +1475,20 @@ Nettle defines cast128 in @file{<nettle/cast128.h>}.
The CAST128 block-size, 8.
The CAST128 block-size, 8.
@end defvr
@end defvr
@defvr Constant CAST128
_
MIN
_
KEY
_
SIZE
@defvr Constant CAST128
_
KEY
_
SIZE
Minimum
CAST128 key size,
5
.
The
CAST128 key size,
16
.
@end defvr
@end defvr
@defvr Constant CAST
128
_
MAX
_
KEY
_
SIZE
@defvr Constant CAST
5
_
MIN
_
KEY
_
SIZE
M
ax
imum CAST
128
key size,
16
.
M
in
imum CAST
5
key size,
5
.
@end defvr
@end defvr
@defvr Constant CAST128
_
KEY
_
SIZE
@defvr Constant CAST5
_
MAX
_
KEY
_
SIZE
Default CAST128 key size, 16.
Maximum CAST5 key size, 16. With 16 octets key (128 bits), CAST-5 is the
same as CAST-128.
@end defvr
@end defvr
@deftypefun void cast128
_
set
_
key (struct cast128
_
ctx *@var
{
ctx
}
,
size
_
t @var
{
length
}
,
const uint8
_
t *@var
{
key
}
)
@deftypefun void cast128
_
set
_
key (struct cast128
_
ctx *@var
{
ctx
}
, const uint8
_
t *@var
{
key
}
)
Initialize the cipher. The same function is used for both encryption and
Initialize the cipher. The same function is used for both encryption and
decryption.
decryption.
@end deftypefun
@end deftypefun
...
@@ -1499,6 +1504,12 @@ in any other way.
...
@@ -1499,6 +1504,12 @@ in any other way.
Analogous to @code
{
cast128
_
encrypt
}
Analogous to @code
{
cast128
_
encrypt
}
@end deftypefun
@end deftypefun
@deftypefun void cast5
_
set
_
key (struct cast128
_
ctx *@var
{
ctx
}
, size
_
t @var
{
length
}
, const uint8
_
t *@var
{
key
}
)
Initialize the cipher. This variant of the key setup takes the key size
as argument. The same function is used for both encryption and
decryption.
@end deftypefun
@subsection ChaCha
@subsection ChaCha
ChaCha is a variant of the stream cipher Salsa20, also designed by D. J.
ChaCha is a variant of the stream cipher Salsa20, also designed by D. J.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment