Skip to content

Commit d4a8a32

Browse files
committed
Re-run autogen
Signed-off-by: willieyz <[email protected]>
1 parent 4702ea7 commit d4a8a32

21 files changed

+2242
-2221
lines changed

examples/basic_deterministic/mldsa_native/custom_no_randomized_config.h

Lines changed: 105 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,25 @@
5252
44 /* Change this for different security strengths */
5353
#endif
5454

55+
/******************************************************************************
56+
* Name: MLD_CONFIG_FILE
57+
*
58+
* Description: If defined, this is a header that will be included instead
59+
* of the default configuration file mldsa/src/config.h.
60+
*
61+
* When you need to build mldsa-native in multiple configurations,
62+
* using varying MLD_CONFIG_FILE can be more convenient
63+
* then configuring everything through CFLAGS.
64+
*
65+
* To use, MLD_CONFIG_FILE _must_ be defined prior
66+
* to the inclusion of any mldsa-native headers. For example,
67+
* it can be set by passing `-DMLD_CONFIG_FILE="..."`
68+
* on the command line.
69+
*
70+
*****************************************************************************/
71+
/* No need to set this -- we _are_ already in a custom config */
72+
/* #define MLD_CONFIG_FILE "config.h" */
73+
5574
/******************************************************************************
5675
* Name: MLD_CONFIG_NAMESPACE_PREFIX
5776
*
@@ -115,24 +134,6 @@
115134
*****************************************************************************/
116135
/* #define MLD_CONFIG_MULTILEVEL_NO_SHARED */
117136

118-
/******************************************************************************
119-
* Name: MLD_CONFIG_FILE
120-
*
121-
* Description: If defined, this is a header that will be included instead
122-
* of the default configuration file mldsa/src/config.h.
123-
*
124-
* When you need to build mldsa-native in multiple configurations,
125-
* using varying MLD_CONFIG_FILE can be more convenient
126-
* then configuring everything through CFLAGS.
127-
*
128-
* To use, MLD_CONFIG_FILE _must_ be defined prior
129-
* to the inclusion of any mldsa-native headers. For example,
130-
* it can be set by passing `-DMLD_CONFIG_FILE="..."`
131-
* on the command line.
132-
*
133-
*****************************************************************************/
134-
/* No need to set this -- we _are_ already in a custom config */
135-
/* #define MLD_CONFIG_FILE "config.h" */
136137

137138
/******************************************************************************
138139
* Name: MLD_CONFIG_USE_NATIVE_BACKEND_ARITH
@@ -216,6 +217,7 @@
216217
!defined(MLD_CONFIG_FIPS202_BACKEND_FILE)
217218
#define MLD_CONFIG_FIPS202_BACKEND_FILE "fips202/native/auto.h"
218219
#endif
220+
219221
/******************************************************************************
220222
* Name: MLD_CONFIG_FIPS202_CUSTOM_HEADER
221223
*
@@ -289,52 +291,6 @@
289291
#endif
290292
*/
291293

292-
/******************************************************************************
293-
* Name: MLD_CONFIG_CUSTOM_MEMCPY
294-
*
295-
* Description: Set this option and define `mld_memcpy` if you want to
296-
* use a custom method to copy memory instead of the standard
297-
* library memcpy function.
298-
*
299-
* The custom implementation must have the same signature and
300-
* behavior as the standard memcpy function:
301-
* void *mld_memcpy(void *dest, const void *src, size_t n)
302-
*
303-
*****************************************************************************/
304-
/* #define MLD_CONFIG_CUSTOM_MEMCPY
305-
#if !defined(__ASSEMBLER__)
306-
#include <stdint.h>
307-
#include "sys.h"
308-
static MLD_INLINE void *mld_memcpy(void *dest, const void *src, size_t n)
309-
{
310-
... your implementation ...
311-
}
312-
#endif
313-
*/
314-
315-
/******************************************************************************
316-
* Name: MLD_CONFIG_CUSTOM_MEMSET
317-
*
318-
* Description: Set this option and define `mld_memset` if you want to
319-
* use a custom method to set memory instead of the standard
320-
* library memset function.
321-
*
322-
* The custom implementation must have the same signature and
323-
* behavior as the standard memset function:
324-
* void *mld_memset(void *s, int c, size_t n)
325-
*
326-
*****************************************************************************/
327-
/* #define MLD_CONFIG_CUSTOM_MEMSET
328-
#if !defined(__ASSEMBLER__)
329-
#include <stdint.h>
330-
#include "sys.h"
331-
static MLD_INLINE void *mld_memset(void *s, int c, size_t n)
332-
{
333-
... your implementation ...
334-
}
335-
#endif
336-
*/
337-
338294
/******************************************************************************
339295
* Name: MLD_CONFIG_CUSTOM_RANDOMBYTES
340296
*
@@ -361,7 +317,6 @@
361317
#endif
362318
*/
363319

364-
365320
/******************************************************************************
366321
* Name: MLD_CONFIG_CUSTOM_CAPABILITY_FUNC
367322
*
@@ -392,58 +347,47 @@
392347
*/
393348

394349
/******************************************************************************
395-
* Name: MLD_CONFIG_NO_RANDOMIZED_API
396-
*
397-
* Description: If this option is set, mldsa-native will be built without the
398-
* randomized API functions (crypto_sign_keypair,
399-
* crypto_sign, crypto_sign_signature, and
400-
* crypto_sign_signature_extmu).
401-
* This allows users to build mldsa-native without providing a
402-
* randombytes() implementation if they only need the
403-
* internal deterministic API
404-
* (crypto_sign_keypair_internal, crypto_sign_signature_internal).
405-
*
406-
* NOTE: This option is incompatible with MLD_CONFIG_KEYGEN_PCT
407-
* as the current PCT implementation requires
408-
* crypto_sign_signature().
409-
*
410-
*****************************************************************************/
411-
#define MLD_CONFIG_NO_RANDOMIZED_API
412-
413-
/******************************************************************************
414-
* Name: MLD_CONFIG_KEYGEN_PCT
415-
*
416-
* Description: Compliance with @[FIPS140_3_IG, p.87] requires a
417-
* Pairwise Consistency Test (PCT) to be carried out on a freshly
418-
* generated keypair before it can be exported.
350+
* Name: MLD_CONFIG_CUSTOM_MEMCPY
419351
*
420-
* Set this option if such a check should be implemented.
421-
* In this case, crypto_sign_keypair_internal and
422-
* crypto_sign_keypair will return a non-zero error code if the
423-
* PCT failed.
352+
* Description: Set this option and define `mld_memcpy` if you want to
353+
* use a custom method to copy memory instead of the standard
354+
* library memcpy function.
424355
*
425-
* NOTE: This feature will drastically lower the performance of
426-
* key generation.
356+
* The custom implementation must have the same signature and
357+
* behavior as the standard memcpy function:
358+
* void *mld_memcpy(void *dest, const void *src, size_t n)
427359
*
428360
*****************************************************************************/
429-
/* #define MLD_CONFIG_KEYGEN_PCT */
361+
/* #define MLD_CONFIG_CUSTOM_MEMCPY
362+
#if !defined(__ASSEMBLER__)
363+
#include <stdint.h>
364+
#include "sys.h"
365+
static MLD_INLINE void *mld_memcpy(void *dest, const void *src, size_t n)
366+
{
367+
... your implementation ...
368+
}
369+
#endif
370+
*/
430371

431372
/******************************************************************************
432-
* Name: MLD_CONFIG_KEYGEN_PCT_BREAKAGE_TEST
373+
* Name: MLD_CONFIG_CUSTOM_MEMSET
433374
*
434-
* Description: If this option is set, the user must provide a runtime
435-
* function `static inline int mld_break_pct() { ... }` to
436-
* indicate whether the PCT should be made fail.
375+
* Description: Set this option and define `mld_memset` if you want to
376+
* use a custom method to set memory instead of the standard
377+
* library memset function.
437378
*
438-
* This option only has an effect if MLD_CONFIG_KEYGEN_PCT is set.
379+
* The custom implementation must have the same signature and
380+
* behavior as the standard memset function:
381+
* void *mld_memset(void *s, int c, size_t n)
439382
*
440383
*****************************************************************************/
441-
/* #define MLD_CONFIG_KEYGEN_PCT_BREAKAGE_TEST
384+
/* #define MLD_CONFIG_CUSTOM_MEMSET
442385
#if !defined(__ASSEMBLER__)
386+
#include <stdint.h>
443387
#include "sys.h"
444-
static MLD_INLINE int mld_break_pct(void)
388+
static MLD_INLINE void *mld_memset(void *s, int c, size_t n)
445389
{
446-
... return 0/1 depending on whether PCT should be broken ...
390+
... your implementation ...
447391
}
448392
#endif
449393
*/
@@ -524,6 +468,63 @@
524468
*****************************************************************************/
525469
/* #define MLD_CONFIG_NO_ASM_VALUE_BARRIER */
526470

471+
/******************************************************************************
472+
* Name: MLD_CONFIG_NO_RANDOMIZED_API
473+
*
474+
* Description: If this option is set, mldsa-native will be built without the
475+
* randomized API functions (crypto_sign_keypair,
476+
* crypto_sign, crypto_sign_signature, and
477+
* crypto_sign_signature_extmu).
478+
* This allows users to build mldsa-native without providing a
479+
* randombytes() implementation if they only need the
480+
* internal deterministic API
481+
* (crypto_sign_keypair_internal, crypto_sign_signature_internal).
482+
*
483+
* NOTE: This option is incompatible with MLD_CONFIG_KEYGEN_PCT
484+
* as the current PCT implementation requires
485+
* crypto_sign_signature().
486+
*
487+
*****************************************************************************/
488+
#define MLD_CONFIG_NO_RANDOMIZED_API
489+
490+
/******************************************************************************
491+
* Name: MLD_CONFIG_KEYGEN_PCT
492+
*
493+
* Description: Compliance with @[FIPS140_3_IG, p.87] requires a
494+
* Pairwise Consistency Test (PCT) to be carried out on a freshly
495+
* generated keypair before it can be exported.
496+
*
497+
* Set this option if such a check should be implemented.
498+
* In this case, crypto_sign_keypair_internal and
499+
* crypto_sign_keypair will return a non-zero error code if the
500+
* PCT failed.
501+
*
502+
* NOTE: This feature will drastically lower the performance of
503+
* key generation.
504+
*
505+
*****************************************************************************/
506+
/* #define MLD_CONFIG_KEYGEN_PCT */
507+
508+
/******************************************************************************
509+
* Name: MLD_CONFIG_KEYGEN_PCT_BREAKAGE_TEST
510+
*
511+
* Description: If this option is set, the user must provide a runtime
512+
* function `static inline int mld_break_pct() { ... }` to
513+
* indicate whether the PCT should be made fail.
514+
*
515+
* This option only has an effect if MLD_CONFIG_KEYGEN_PCT is set.
516+
*
517+
*****************************************************************************/
518+
/* #define MLD_CONFIG_KEYGEN_PCT_BREAKAGE_TEST
519+
#if !defined(__ASSEMBLER__)
520+
#include "sys.h"
521+
static MLD_INLINE int mld_break_pct(void)
522+
{
523+
... return 0/1 depending on whether PCT should be broken ...
524+
}
525+
#endif
526+
*/
527+
527528
/******************************************************************************
528529
* Name: MLD_CONFIG_SERIAL_FIPS202_ONLY
529530
*

0 commit comments

Comments
 (0)