Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
pnmadelaine committed Nov 27, 2023
1 parent 052ab92 commit cfa7d3d
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 101 deletions.
12 changes: 6 additions & 6 deletions docs/reference/evercrypt/hash/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ EverCrypt provides multiple hash algorithms, i.e., ...
```{doxygendefine} Spec_Hash_Definitions_Blake2B
```

```{doxygentypedef} EverCrypt_Hash_Incremental_hash_state
```{doxygentypedef} EverCrypt_Hash_Incremental_state_t
```

## Functions

<!-- EverCrypt_Hash_string_of_alg, EverCrypt_Hash_uu___is_MD5_s, EverCrypt_Hash_uu___is_SHA1_s, EverCrypt_Hash_uu___is_SHA2_224_s, EverCrypt_Hash_uu___is_SHA2_256_s, EverCrypt_Hash_uu___is_SHA2_384_s, EverCrypt_Hash_uu___is_SHA2_512_s, EverCrypt_Hash_uu___is_Blake2S_s, EverCrypt_Hash_uu___is_Blake2S_128_s, EverCrypt_Hash_uu___is_Blake2B_s, EverCrypt_Hash_uu___is_Blake2B_256_s, EverCrypt_Hash_alg_of_state, EverCrypt_Hash_create_in, EverCrypt_Hash_create, EverCrypt_Hash_init, EverCrypt_Hash_update_multi_256, EverCrypt_Hash_update, EverCrypt_Hash_update_multi, EverCrypt_Hash_update_last_256, EverCrypt_Hash_update_last, EverCrypt_Hash_finish, EverCrypt_Hash_free, EverCrypt_Hash_copy, EverCrypt_Hash_hash_256, EverCrypt_Hash_hash_224, EverCrypt_Hash_hash, EverCrypt_Hash_Incremental_hash_len, EverCrypt_Hash_Incremental_block_len, EverCrypt_Hash_Incremental_create_in, EverCrypt_Hash_Incremental_init, EverCrypt_Hash_Incremental_update, EverCrypt_Hash_Incremental_finish_md5, EverCrypt_Hash_Incremental_finish_sha1, EverCrypt_Hash_Incremental_finish_sha224, EverCrypt_Hash_Incremental_finish_sha256, EverCrypt_Hash_Incremental_finish_sha384, EverCrypt_Hash_Incremental_finish_sha512, EverCrypt_Hash_Incremental_finish_blake2s, EverCrypt_Hash_Incremental_finish_blake2b, EverCrypt_Hash_Incremental_alg_of_state, EverCrypt_Hash_Incremental_finish, EverCrypt_Hash_Incremental_free -->
<!-- EverCrypt_Hash_string_of_alg, EverCrypt_Hash_uu___is_MD5_s, EverCrypt_Hash_uu___is_SHA1_s, EverCrypt_Hash_uu___is_SHA2_224_s, EverCrypt_Hash_uu___is_SHA2_256_s, EverCrypt_Hash_uu___is_SHA2_384_s, EverCrypt_Hash_uu___is_SHA2_512_s, EverCrypt_Hash_uu___is_Blake2S_s, EverCrypt_Hash_uu___is_Blake2S_128_s, EverCrypt_Hash_uu___is_Blake2B_s, EverCrypt_Hash_uu___is_Blake2B_256_s, EverCrypt_Hash_alg_of_state, EverCrypt_Hash_create_in, EverCrypt_Hash_create, EverCrypt_Hash_init, EverCrypt_Hash_update_multi_256, EverCrypt_Hash_update, EverCrypt_Hash_update_multi, EverCrypt_Hash_update_last_256, EverCrypt_Hash_update_last, EverCrypt_Hash_finish, EverCrypt_Hash_free, EverCrypt_Hash_copy, EverCrypt_Hash_hash_256, EverCrypt_Hash_hash_224, EverCrypt_Hash_hash, EverCrypt_Hash_Incremental_hash_len, EverCrypt_Hash_Incremental_block_len, EverCrypt_Hash_Incremental_malloc, EverCrypt_Hash_Incremental_reset, EverCrypt_Hash_Incremental_update, EverCrypt_Hash_Incremental_finish_md5, EverCrypt_Hash_Incremental_finish_sha1, EverCrypt_Hash_Incremental_finish_sha224, EverCrypt_Hash_Incremental_finish_sha256, EverCrypt_Hash_Incremental_finish_sha384, EverCrypt_Hash_Incremental_finish_sha512, EverCrypt_Hash_Incremental_finish_blake2s, EverCrypt_Hash_Incremental_finish_blake2b, EverCrypt_Hash_Incremental_alg_of_state, EverCrypt_Hash_Incremental_digest, EverCrypt_Hash_Incremental_free -->

```{doxygenfunction} EverCrypt_Hash_Incremental_hash
```
Expand All @@ -59,17 +59,17 @@ EverCrypt provides multiple hash algorithms, i.e., ...

--------------------------------------------------------------------------------

```{doxygenfunction} EverCrypt_Hash_Incremental_create_in
```{doxygenfunction} EverCrypt_Hash_Incremental_malloc
```

Create a hash state.

`a` Algorithm to use.

```{doxygenfunction} EverCrypt_Hash_Incremental_init
```{doxygenfunction} EverCrypt_Hash_Incremental_reset
```

Initialize hash state).
Reset hash state).

`s` The hash state.

Expand All @@ -82,7 +82,7 @@ Feed the next chunk of the message that will be hashed.
`data` Pointer to the next chunk of the message that will be hashed.
`len` Length of the next chunk of the message that will be hashed.

```{doxygenfunction} EverCrypt_Hash_Incremental_finish
```{doxygenfunction} EverCrypt_Hash_Incremental_digest
```

Finish the hash calculation and write the digest to `dst`.
Expand Down
18 changes: 9 additions & 9 deletions docs/reference/hacl/aead/chacha20poly1305.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All memory for the output variables have to be allocated by the caller.
````{group-tab} 32
```c
#include "Hacl_Chacha20Poly1305_32.h"
#include "Hacl_AEAD_Chacha20Poly1305.h"
```
A portable C implementation that can be compiled and run on any platform that is 32-bit or higher.
Expand All @@ -20,7 +20,7 @@ This implementation works on all CPUs.
````{group-tab} 128
```c
#include "Hacl_Chacha20Poly1305_128.h"
#include "Hacl_AEAD_Chacha20Poly1305_Simd128.h"
```
A 128-bit vectorized C implementation that can be compiled and run on any platform that supports 128-bit SIMD instructions.
Expand All @@ -30,7 +30,7 @@ Support for VEC128 is needed. Please see the [HACL Packages book].
````{group-tab} 256
```c
#include "Hacl_Chacha20Poly1305_256.h"
#include "Hacl_AEAD_Chacha20Poly1305_Simd256.h"
```
A 256-bit vectorized C implementation that can be compiled and run on any platform that supports 256-bit SIMD instructions.
Expand Down Expand Up @@ -59,21 +59,21 @@ Support for VEC256 is needed. Please see the [HACL Packages book].

`````{tabs}
````{group-tab} 32
```{doxygenfunction} Hacl_Chacha20Poly1305_32_aead_encrypt
```{doxygenfunction} Hacl_AEAD_Chacha20Poly1305_encrypt
```
```{doxygenfunction} Hacl_Chacha20Poly1305_32_aead_decrypt
```{doxygenfunction} Hacl_AEAD_Chacha20Poly1305_decrypt
```
````
````{group-tab} 128
```{doxygenfunction} Hacl_Chacha20Poly1305_128_aead_encrypt
```{doxygenfunction} Hacl_AEAD_Chacha20Poly1305_Simd128_encrypt
```
```{doxygenfunction} Hacl_Chacha20Poly1305_128_aead_decrypt
```{doxygenfunction} Hacl_AEAD_Chacha20Poly1305_Simd128_decrypt
```
````
````{group-tab} 256
```{doxygenfunction} Hacl_Chacha20Poly1305_256_aead_encrypt
```{doxygenfunction} Hacl_AEAD_Chacha20Poly1305_Simd256_encrypt
```
```{doxygenfunction} Hacl_Chacha20Poly1305_256_aead_decrypt
```{doxygenfunction} Hacl_AEAD_Chacha20Poly1305_Simd256_decrypt
```
````
`````
Expand Down
36 changes: 18 additions & 18 deletions docs/reference/hacl/hash/blake2/blake2b.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ It also has a build-in keying mechanism so that it can be used to replace HMAC-b
`````{tabs}
````{group-tab} 32
```C
#include "Hacl_Hash_Blake2.h"
#include "Hacl_Hash_Blake2b.h"
```
````
````{group-tab} 256
```C
#include "Hacl_Hash_Blake2b_256.h"
#include "Hacl_Hash_Blake2b_Simd256.h"
```
````
`````
Expand Down Expand Up @@ -47,11 +47,11 @@ It also has a build-in keying mechanism so that it can be used to replace HMAC-b

`````{tabs}
````{group-tab} 32
```{doxygenfunction} Hacl_Blake2b_32_blake2b
```{doxygenfunction} Hacl_Hash_Blake2b_hash_with_key
```
````
````{group-tab} 256
```{doxygenfunction} Hacl_Blake2b_256_blake2b
```{doxygenfunction} Hacl_Hash_Blake2b_Simd256_hash_with_key
```
````
`````
Expand All @@ -63,12 +63,12 @@ It also has a build-in keying mechanism so that it can be used to replace HMAC-b
`````{tabs}
````{group-tab} 32
```C
#include "Hacl_Streaming_Blake2.h"
#include "Hacl_Hash_Blake2b.h"
```
````
````{group-tab} 256
```C
#include "Hacl_Streaming_Blake2b_256.h"
#include "Hacl_Hash_Blake2b_Simd256.h"
```
````
`````
Expand Down Expand Up @@ -98,31 +98,31 @@ It also has a build-in keying mechanism so that it can be used to replace HMAC-b

`````{tabs}
````{group-tab} 32
```{doxygentypedef} Hacl_Streaming_Blake2_blake2b_32_state
```{doxygentypedef} Hacl_Hash_Blake2b_state_t
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2b_32_no_key_create_in
```{doxygenfunction} Hacl_Hash_Blake2b_malloc
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2b_32_no_key_init
```{doxygenfunction} Hacl_Hash_Blake2b_update
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2b_32_no_key_update
```{doxygenfunction} Hacl_Hash_Blake2b_digest
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2b_32_no_key_finish
```{doxygenfunction} Hacl_Hash_Blake2b_reset
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2b_32_no_key_free
```{doxygenfunction} Hacl_Hash_Blake2b_free
```
````
````{group-tab} 256
```{doxygentypedef} Hacl_Streaming_Blake2b_256_blake2b_256_state
```{doxygentypedef} Hacl_Hash_Blake2b_Simd256_state_t
```
```{doxygenfunction} Hacl_Streaming_Blake2b_256_blake2b_256_no_key_create_in
```{doxygenfunction} Hacl_Hash_Blake2b_Simd256_malloc
```
```{doxygenfunction} Hacl_Streaming_Blake2b_256_blake2b_256_no_key_init
```{doxygenfunction} Hacl_Hash_Blake2b_Simd256_update
```
```{doxygenfunction} Hacl_Streaming_Blake2b_256_blake2b_256_no_key_update
```{doxygenfunction} Hacl_Hash_Blake2b_Simd256_digest
```
```{doxygenfunction} Hacl_Streaming_Blake2b_256_blake2b_256_no_key_finish
```{doxygenfunction} Hacl_Hash_Blake2b_Simd256_reset
```
```{doxygenfunction} Hacl_Streaming_Blake2b_256_blake2b_256_no_key_free
```{doxygenfunction} Hacl_Hash_Blake2b_Simd256_free
```
````
`````
36 changes: 18 additions & 18 deletions docs/reference/hacl/hash/blake2/blake2s.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any size
`````{tabs}
````{group-tab} 32
```C
#include "Hacl_Hash_Blake2.h"
#include "Hacl_Hash_Blake2s.h"
```
````
````{group-tab} 128
```C
#include "Hacl_Hash_Blake2s_128.h"
#include "Hacl_Hash_Blake2s_Simd128.h"
```
````
`````
Expand Down Expand Up @@ -46,11 +46,11 @@ BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any size

`````{tabs}
````{group-tab} 32
```{doxygenfunction} Hacl_Blake2s_32_blake2s
```{doxygenfunction} Hacl_Hash_Blake2s_hash_with_key
```
````
````{group-tab} 128
```{doxygenfunction} Hacl_Blake2s_128_blake2s
```{doxygenfunction} Hacl_Hash_Blake2s_Simd128_hash_with_key
```
````
`````
Expand All @@ -62,12 +62,12 @@ BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any size
`````{tabs}
````{group-tab} 32
```C
#include "Hacl_Streaming_Blake2.h"
#include "Hacl_Hash_Blake2.h"
```
````
````{group-tab} 128
```C
#include "Hacl_Streaming_Blake2s_128.h"
#include "Hacl_Hash_Blake2s_Simd128.h"
```
````
`````
Expand Down Expand Up @@ -97,31 +97,31 @@ BLAKE2s is optimized for 8- to 32-bit platforms and produces digests of any size

`````{tabs}
````{group-tab} 32
```{doxygentypedef} Hacl_Streaming_Blake2_blake2s_32_state
```{doxygentypedef} Hacl_Hash_Blake2s_state_t
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2s_32_no_key_create_in
```{doxygenfunction} Hacl_Hash_Blake2s_malloc
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2s_32_no_key_init
```{doxygenfunction} Hacl_Hash_Blake2s_update
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2s_32_no_key_update
```{doxygenfunction} Hacl_Hash_Blake2s_digest
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2s_32_no_key_finish
```{doxygenfunction} Hacl_Hash_Blake2s_reset
```
```{doxygenfunction} Hacl_Streaming_Blake2_blake2s_32_no_key_free
```{doxygenfunction} Hacl_Hash_Blake2s_free
```
````
````{group-tab} 128
```{doxygentypedef} Hacl_Streaming_Blake2s_128_blake2s_128_state
```{doxygentypedef} Hacl_Hash_Blake2s_Simd128_state_t
```
```{doxygenfunction} Hacl_Streaming_Blake2s_128_blake2s_128_no_key_create_in
```{doxygenfunction} Hacl_Hash_Blake2s_Simd128_malloc
```
```{doxygenfunction} Hacl_Streaming_Blake2s_128_blake2s_128_no_key_init
```{doxygenfunction} Hacl_Hash_Blake2s_Simd128_update
```
```{doxygenfunction} Hacl_Streaming_Blake2s_128_blake2s_128_no_key_update
```{doxygenfunction} Hacl_Hash_Blake2s_Simd128_digest
```
```{doxygenfunction} Hacl_Streaming_Blake2s_128_blake2s_128_no_key_finish
```{doxygenfunction} Hacl_Hash_Blake2s_Simd128_reset
```
```{doxygenfunction} Hacl_Streaming_Blake2s_128_blake2s_128_no_key_free
```{doxygenfunction} Hacl_Hash_Blake2s_Simd128_free
```
````
`````
10 changes: 5 additions & 5 deletions docs/reference/hacl/hash/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ If you want to hash a complete messages, i.e., can provide a slice of memory tha
If you need to provide a message chunk-by-chunk, e.g., because you read the message from network or similar, it could be more appropriate to use the streaming API.

The streaming API has roughly three phases: init, update, and finish.
Typically, you create a state element by using `init`, call `update` as often as needed, and then call `finish` to obtain the final digest.
Typically, you create a state element by using `malloc`, call `update` as often as needed, and then call `digest` to obtain the final digest.
Finally, you `free` the state element.

**Streaming API (with intermediate digests)**

It is also possible to obtain all intermediate digests by calling `finish` more than once.
You can call `update("Hello, ")`, and `finish` to obtain the hash of `"Hello, "`.
Then you can call `update("World!")`, and `finish` *again* to obtain the hash of `"Hello, World!"`.
You only need to call `init` and `free` once to obtain both digests.
It is also possible to obtain all intermediate digests by calling `digest` more than once.
You can call `update("Hello, ")`, and `digest` to obtain the hash of `"Hello, "`.
Then you can call `update("World!")`, and `digest` *again* to obtain the hash of `"Hello, World!"`.
You only need to call `malloc` and `free` once to obtain both digests.

```{toctree}
:caption: "Algorithms"
Expand Down
14 changes: 7 additions & 7 deletions docs/reference/hacl/hash/sha1.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SHA-1 is insecure. Please avoid or ask your cryptographer of trust for permissio
:end-before: "// END OneShot"
```

```{doxygenfunction} Hacl_Streaming_SHA1_legacy_hash
```{doxygenfunction} Hacl_Hash_SHA1_legacy_hash
```

### Streaming
Expand Down Expand Up @@ -52,20 +52,20 @@ SHA-1 is insecure. Please avoid or ask your cryptographer of trust for permissio
:end-before: "// ANCHOR_END(streaming)"
```

```{doxygentypedef} Hacl_Streaming_SHA1_state
```{doxygentypedef} Hacl_Hash_SHA1_state_t
```

```{doxygenfunction} Hacl_Streaming_SHA1_legacy_create_in
```{doxygenfunction} Hacl_Hash_SHA1_malloc
```

```{doxygenfunction} Hacl_Streaming_SHA1_legacy_init
```{doxygenfunction} Hacl_Hash_SHA1_update
```

```{doxygenfunction} Hacl_Streaming_SHA1_legacy_update
```{doxygenfunction} Hacl_Hash_SHA1_digest
```

```{doxygenfunction} Hacl_Streaming_SHA1_legacy_finish
```{doxygenfunction} Hacl_Hash_SHA1_reset
```

```{doxygenfunction} Hacl_Streaming_SHA1_legacy_free
```{doxygenfunction} Hacl_Hash_SHA1_free
```
Loading

0 comments on commit cfa7d3d

Please sign in to comment.