Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nettle
nettle
Commits
0c80f188
Commit
0c80f188
authored
May 08, 2014
by
Niels Möller
Browse files
Document nettle_aead.
parent
aa52330e
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
0c80f188
2014-05-08 Niels Möller <nisse@lysator.liu.se>
* nettle.texinfo (nettle_aead abstraction): Document nettle_aead.
* Makefile.in (nettle_SOURCES): Added nettle-meta-aeads.c.
* nettle-meta.h (nettle_aeads): Declare array.
* nettle-meta-aeads.c (nettle_aeads): New file, new array.
...
...
nettle.texinfo
View file @
0c80f188
...
...
@@ -994,7 +994,9 @@ This function also resets the context in the same way as
@node nettle
_
hash abstraction,, Legacy hash functions, Hash functions
@comment node-name, next, previous, up
@subsection The nettle
_
hash abstraction
@subsection The @code
{
struct nettle
_
hash
}
abstraction
@cindex nettle
_
hash
@cindex nettle
_
hashes
Nettle includes a struct including information about the supported hash
functions. It is defined in @file
{
<nettle/nettle-meta.h>
}
, and is used
...
...
@@ -1809,7 +1811,9 @@ Analogous to @code{twofish_encrypt}
@c @node nettle
_
cipher, Cipher Block Chaining, Cipher functions, Reference
@c @comment node-name, next, previous, up
@subsection @code
{
struct nettle
_
cipher
}
@subsection The @code
{
struct nettle
_
cipher
}
abstraction
@cindex nettle
_
cipher
@cindex nettle
_
ciphers
Nettle includes a struct including information about some of the more
regular cipher functions. It can be useful for applications that need a
...
...
@@ -2137,6 +2141,7 @@ more adventurous alternative, in particular if performance is important.
* GCM::
* CCM::
* ChaCha-Poly1305::
* nettle
_
aead abstraction::
@end menu
@node EAX, GCM, Authenticated encryption, Authenticated encryption
...
...
@@ -2783,7 +2788,7 @@ These are identical to @code{ccm_encrypt_message} and @code{ccm_decrypt_message}
except that @var
{
cipher
}
and @var
{
f
}
are replaced with a context structure.
@end deftypefun
@node ChaCha-Poly1305, , CCM, Authenticated encryption
@node ChaCha-Poly1305,
nettle
_
aead abstraction
, CCM, Authenticated encryption
@comment node-name, next, previous, up
@subsection ChaCha-Poly1305
...
...
@@ -2866,6 +2871,39 @@ smaller than @code{CHACHA_POLY1305_DIGEST_SIZE}, only the first
@var
{
length
}
octets of the digest are written.
@end deftypefun
@node nettle
_
aead abstraction, , ChaCha-Poly1305, Authenticated encryption
@comment node-name, next, previous, up
@subsection The @code
{
struct nettle
_
aead
}
abstraction
@cindex nettle
_
aead
@cindex nettle
_
aeads
Nettle includes a struct including information about the supported hash
functions. It is defined in @file
{
<nettle/nettle-meta.h>
}
.
@deftp
{
Meta struct
}
@code
{
struct nettle
_
aead
}
name context
_
size block
_
size key
_
size nonce
_
size digest
_
size set
_
encrypt
_
key set
_
decrypt
_
key set
_
nonce update encrypt decrypt digest
The last seven attributes are function pointers.
@end deftp
@deftypevr
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
gcm
_
aes128
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
gcm
_
aes192
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
gcm
_
aes256
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
gcm
_
camellia128
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
gcm
_
camellia256
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
eax
_
aes128
@deftypevrx
{
Constant Struct
}
{
struct nettle
_
aead
}
nettle
_
chacha
_
poly1305
These are most of the @acronym
{
AEAD
}
constructions that Nettle
implements. Note that @acronym
{
CCM
}
is missing; it requirement that the
message size is specified in advance makes it incompatible with the
@code
{
nettle
_
aead
}
abstraction.
@end deftypevr
Nettle also exports a list of all these constructions.
@deftypevr
{
Constant Array
}
{
struct nettle
_
aead **
}
nettle
_
aeads
This list can be used to dynamically enumerate or search the supported
algorithms. NULL-terminated.
@end deftypevr
@node Keyed hash functions, Key derivation functions, Authenticated encryption, Reference
@comment node-name, next, previous, up
@section Keyed Hash Functions
...
...
Write
Preview
Supports
Markdown
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