Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
5c4fe9a7
Commit
5c4fe9a7
authored
Aug 24, 2004
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation about ARCTWO.
Rev: src/nettle/nettle.texinfo:1.26
parent
c90d29a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
4 deletions
+76
-4
nettle.texinfo
nettle.texinfo
+76
-4
No files found.
nettle.texinfo
View file @
5c4fe9a7
...
...
@@ -23,7 +23,7 @@
Draft manual for the Nettle library. This manual corresponds to version
@value
{
UPDATED-FOR
}
.
Copyright 2001 @value
{
AUTHOR
}
Copyright 2001
, 2004
@value
{
AUTHOR
}
Permission is granted to make and distribute verbatim
copies of this manual provided the copyright notice and
...
...
@@ -172,6 +172,11 @@ by Rafael Sevilla. Released under the LGPL.
The implementation of the ARCFOUR (also known as RC4) cipher is written
by Niels Möller. Released under the LGPL.
@item ARCTWO
The implementation of the ARCTWO (also known as RC2) cipher is written
by Nikos Mavroyanopoulos and modified by Werner Koch and Simon
Josefsson. Released under the LGPL.
@item BLOWFISH
The implementation of the BLOWFISH cipher is written by Werner Koch,
copyright owned by the Free Software Foundation. Also hacked by Ray
...
...
@@ -358,7 +363,7 @@ To start over, you can call @code{md5_init} at any time.
@subsection @acronym
{
MD2
}
MD2 is another hash function of Ronald Rivest
s
', described in
MD2 is another hash function of Ronald Rivest'
s
, described in
@cite
{
RFC 1319
}
. It outputs message digests of 128 bits, or 16 octets.
Nettle defines MD2 in @file
{
<nettle/md2.h>
}
.
...
...
@@ -699,6 +704,67 @@ them one after another. The result is the same as if you had called
@code
{
arcfour
_
crypt
}
only once with all the data.
@end deftypefun
@subsection ARCTWO
ARCTWO (also known as the trade marked name RC2) is a block cipher
specified in RFC 2268. Nettle also include a variation of the ARCTWO
set key operation that lack one step, to be compatible with the
reverse engineered RRC2 cipher description, as described in a Usenet
post to @code
{
sci.crypt
}
by Peter Gutmann.
ARCTWO uses a block size of 64 bits, and variable key-size ranging
from 1 to 128 octets. Besides the key, ARCTWO also has a second
parameter to key setup, the number of effective key bits, @code
{
ekb
}
.
This parameter can be used to artificially reduce the key size. In
practice, @code
{
ekb
}
is usually set equal to the input key size.
Nettle defines ARCTWO in @file
{
<nettle/arctwo.h>
}
.
We do not recommend the use of ARCTWO; the Nettle implementation is
provided primarily for interoperability with existing applications and
standards.
@deftp
{
Context struct
}
{
struct arctwo
_
ctx
}
@end deftp
@defvr Constant ARCTWO
_
BLOCK
_
SIZE
The AES block-size, 8
@end defvr
@defvr Constant ARCTWO
_
MIN
_
KEY
_
SIZE
@end defvr
@defvr Constant ARCTWO
_
MAX
_
KEY
_
SIZE
@end defvr
@defvr Constant ARCTWO
_
KEY
_
SIZE
Default ARCTWO key size, 8
@end defvr
@deftypefun void arctwo
_
set
_
key
_
ekb (struct arctwo
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
key
}
, unsigned @var
{
ekb
}
)
@deftypefunx void arctwo
_
set
_
key (struct arctwo
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
key
}
)
@deftypefunx void arctwo
_
set
_
key
_
gutmann (struct arctwo
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
key
}
)
Initialize the cipher. The same function is used for both encryption
and decryption. The first function is the most general one, which lets
you provide both the variable size key, and the desired effective key
size (in bits). The maximum value for @var
{
ekb
}
is 1024, and for
convenience, @code
{
ekb = 0
}
has the same effect as @code
{
ekb = 1024
}
.
@code
{
arctwo
_
set
_
key(ctx, length, key)
}
is equivalent to
@code
{
arctwo
_
set
_
key
_
ekb(ctx, length, key, 8*length)
}
, and
@code
{
arctwo
_
set
_
key
_
gutmann(ctx, length, key)
}
is equivalent to
@code
{
arctwo
_
set
_
key
_
ekb(ctx, length, key, 1024)
}
@end deftypefun
@deftypefun void arctwo
_
encrypt (struct arctwo
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
dst
}
, uint8
_
t *@var
{
src
}
)
Encryption function. @var
{
length
}
must be an integral multiple of the
block size. If it is more than one block, the data is processed in ECB
mode. @code
{
src
}
and @code
{
dst
}
may be equal, but they must not
overlap in any other way.
@end deftypefun
@deftypefun void arctwo
_
decrypt (struct arctwo
_
ctx *@var
{
ctx
}
, unsigned @var
{
length
}
, const uint8
_
t *@var
{
dst
}
, uint8
_
t *@var
{
src
}
)
Analogous to @code
{
arctwo
_
encrypt
}
@end deftypefun
@subsection CAST128
CAST-128 is a block cipher, specified in @cite
{
RFC 2144
}
. It uses a 64
...
...
@@ -1015,8 +1081,13 @@ struct, which is of size @code{context_size}.
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
cipher
}
nettle
_
twofish192
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
cipher
}
nettle
_
twofish256
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
cipher
}
nettle
_
arctwo40;
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
cipher
}
nettle
_
arctwo64;
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
cipher
}
nettle
_
arctwo128;
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
cipher
}
nettle
_
arctwo
_
gutmann128;
Nettle includes such structs for all the @emph
{
regular
}
ciphers, i.e.
ones without weak keys or other oddit
y
.
ones without weak keys or other oddit
ies
.
@end deftypevr
@node Cipher Block Chaining, Keyed hash functions, Cipher functions, Reference
...
...
@@ -2241,4 +2312,5 @@ End:
@c LocalWords: NIST Alice's GMP bignum Diffie Adi Shamir Adleman Euclid's ASN
@c LocalWords: PKCS callbacks Young's urtica dioica autoconf automake SSH tad
@c LocalWords: unguessability reseeding reseed alternatingly keysym subkeys
@c LocalWords: DSA gmp FIPS DSS libdes OpenSSL
@c LocalWords: DSA gmp FIPS DSS libdes OpenSSL ARCTWO Josefsson Nikos Andreas
@c LocalWords: Mavroyanopoulos Sigfridsson Comstedt interoperability
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