Ver código fonte

Merge pull request #208 from PQClean/hash_state_comment

Document what exactly hash_state.h defines
master
Thom Wiggers 5 anos atrás
committed by GitHub
pai
commit
b109f4db4e
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados ID da chave GPG: 4AEE18F83AFDEB23
36 arquivos alterados com 828 adições e 72 exclusões
  1. +23
    -2
      crypto_sign/sphincs-haraka-128f-robust/clean/hash_state.h
  2. +23
    -2
      crypto_sign/sphincs-haraka-128f-simple/clean/hash_state.h
  3. +23
    -2
      crypto_sign/sphincs-haraka-128s-robust/clean/hash_state.h
  4. +23
    -2
      crypto_sign/sphincs-haraka-128s-simple/clean/hash_state.h
  5. +23
    -2
      crypto_sign/sphincs-haraka-192f-robust/clean/hash_state.h
  6. +23
    -2
      crypto_sign/sphincs-haraka-192f-simple/clean/hash_state.h
  7. +23
    -2
      crypto_sign/sphincs-haraka-192s-robust/clean/hash_state.h
  8. +23
    -2
      crypto_sign/sphincs-haraka-192s-simple/clean/hash_state.h
  9. +23
    -2
      crypto_sign/sphincs-haraka-256f-robust/clean/hash_state.h
  10. +23
    -2
      crypto_sign/sphincs-haraka-256f-simple/clean/hash_state.h
  11. +23
    -2
      crypto_sign/sphincs-haraka-256s-robust/clean/hash_state.h
  12. +23
    -2
      crypto_sign/sphincs-haraka-256s-simple/clean/hash_state.h
  13. +23
    -2
      crypto_sign/sphincs-sha256-128f-robust/clean/hash_state.h
  14. +23
    -2
      crypto_sign/sphincs-sha256-128f-simple/clean/hash_state.h
  15. +23
    -2
      crypto_sign/sphincs-sha256-128s-robust/clean/hash_state.h
  16. +23
    -2
      crypto_sign/sphincs-sha256-128s-simple/clean/hash_state.h
  17. +23
    -2
      crypto_sign/sphincs-sha256-192f-robust/clean/hash_state.h
  18. +23
    -2
      crypto_sign/sphincs-sha256-192f-simple/clean/hash_state.h
  19. +23
    -2
      crypto_sign/sphincs-sha256-192s-robust/clean/hash_state.h
  20. +23
    -2
      crypto_sign/sphincs-sha256-192s-simple/clean/hash_state.h
  21. +23
    -2
      crypto_sign/sphincs-sha256-256f-robust/clean/hash_state.h
  22. +23
    -2
      crypto_sign/sphincs-sha256-256f-simple/clean/hash_state.h
  23. +23
    -2
      crypto_sign/sphincs-sha256-256s-robust/clean/hash_state.h
  24. +23
    -2
      crypto_sign/sphincs-sha256-256s-simple/clean/hash_state.h
  25. +23
    -2
      crypto_sign/sphincs-shake256-128f-robust/clean/hash_state.h
  26. +23
    -2
      crypto_sign/sphincs-shake256-128f-simple/clean/hash_state.h
  27. +23
    -2
      crypto_sign/sphincs-shake256-128s-robust/clean/hash_state.h
  28. +23
    -2
      crypto_sign/sphincs-shake256-128s-simple/clean/hash_state.h
  29. +23
    -2
      crypto_sign/sphincs-shake256-192f-robust/clean/hash_state.h
  30. +23
    -2
      crypto_sign/sphincs-shake256-192f-simple/clean/hash_state.h
  31. +23
    -2
      crypto_sign/sphincs-shake256-192s-robust/clean/hash_state.h
  32. +23
    -2
      crypto_sign/sphincs-shake256-192s-simple/clean/hash_state.h
  33. +23
    -2
      crypto_sign/sphincs-shake256-256f-robust/clean/hash_state.h
  34. +23
    -2
      crypto_sign/sphincs-shake256-256f-simple/clean/hash_state.h
  35. +23
    -2
      crypto_sign/sphincs-shake256-256s-robust/clean/hash_state.h
  36. +23
    -2
      crypto_sign/sphincs-shake256-256s-simple/clean/hash_state.h

+ 23
- 2
crypto_sign/sphincs-haraka-128f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-128f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-128s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-128s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-192f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-192f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-192s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-192s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-256f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-256f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-256s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-haraka-256s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "haraka.h"
#define hash_state harakactx


+ 23
- 2
crypto_sign/sphincs-sha256-128f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-128f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-128s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-128s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-192f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-192f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-192s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-192s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-256f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-256f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-256s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-sha256-256s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/

#include "sha2.h"
#define hash_state sha256ctx


+ 23
- 2
crypto_sign/sphincs-shake256-128f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-128f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-128s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-128s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-192f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-192f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-192s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-192s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-256f-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-256f-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-256s-robust/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


+ 23
- 2
crypto_sign/sphincs-shake256-256s-simple/clean/hash_state.h Ver arquivo

@@ -1,5 +1,26 @@
#ifndef SPX_PRIMITIVE_H
#define SPX_PRIMITIVE_H
#ifndef SPX_HASH_STATE_H
#define SPX_HASH_STATE_H

/**
* Defines the type of the hash function state.
*
* Don't be fooled into thinking this instance of SPHINCS+ isn't stateless!
*
* From Section 7.2.2 from the SPHINCS+ round-2 specification:
*
* Each of the instances of the tweakable hash function take PK.seed as its
* first input, which is constant for a given key pair – and, thus, across
* a single signature. This leads to a lot of redundant computation. To remedy
* this, we pad PK.seed to the length of a full 64-byte SHA-256 input block.
* Because of the Merkle-Damgård construction that underlies SHA-256, this
* allows for reuse of the intermediate SHA-256 state after the initial call to
* the compression function which improves performance.
*
* SHAKE256 does not need this state. Because this implementation is generated
* from a shared code base, we still need to specify some hash_state as it is
* still passed around. We chose to use an `int` as a placeholder for this
* purpose.
*/


#define hash_state int


Carregando…
Cancelar
Salvar