/*----- Constants ---------------------------------------------------------*/
#define SALSA20_NONCESZ 8u
+#define SALSA20_IETF_NONCESZ 12u
#define SALSA20_KEYSZ 32u
#define SALSA20_OUTSZ 64u
const void */*key*/, size_t /*ksz*/,
const void */*nonce*/);
-/* --- @salsa20_setnonce@ --- *
+/* --- @salsa20_setnonce{,_ietf}@ --- *
*
* Arguments: @salsa20_ctx *ctx@ = pointer to context
- * @const void *nonce@ = the nonce (@SALSA20_NONCESZ@ bytes)
+ * @const void *nonce@ = the nonce (@SALSA20_NONCESZ@ or
+ * @SALSA20_IETF_NONCESZ@ bytes)
*
* Returns: ---
*
*/
extern void salsa20_setnonce(salsa20_ctx */*ctx*/, const void */*nonce*/);
+extern void salsa20_setnonce_ietf(salsa20_ctx */*ctx*/,
+ const void */*nonce*/);
-/* --- @salsa20_seek@, @salsa20_seeku64@ --- *
+/* --- @salsa20_seek{,u64,_ietf}@ --- *
*
* Arguments: @salsa20_ctx *ctx@ = pointer to context
* @unsigned long i@, @kludge64 i@ = new position to set
extern void salsa20_seek(salsa20_ctx */*ctx*/, unsigned long /*i*/);
extern void salsa20_seeku64(salsa20_ctx */*ctx*/, kludge64 /*i*/);
+extern void salsa20_seek_ietf(salsa20_ctx */*ctx*/, uint32 /*i*/);
-/* --- @salsa20_tell@, @salsa20_tellu64@ --- *
+/* --- @salsa20_tell{,u64,_ietf}@ --- *
*
* Arguments: @salsa20_ctx *ctx@ = pointer to context
*
extern unsigned long salsa20_tell(salsa20_ctx */*ctx*/);
extern kludge64 salsa20_tellu64(salsa20_ctx */*ctx*/);
+extern uint32 salsa20_tell_ietf(salsa20_ctx */*ctx*/);
/* --- @salsa20{,12,8}_encrypt@ --- *
*
extern const octet salsa20_keysz[];
#define salsa2012_keysz salsa20_keysz
#define salsa208_keysz salsa20_keysz
+#define salsa20_ietf_keysz salsa20_keysz
+#define salsa2012_ietf_keysz salsa20_keysz
+#define salsa208_ietf_keysz salsa20_keysz
#define xsalsa20_keysz salsa20_keysz
#define xsalsa2012_keysz salsa20_keysz
#define xsalsa208_keysz salsa20_keysz
const gccipher salsa20, salsa2012, salsa208;
+const gccipher salsa20_ietf, salsa2012_ietf, salsa208_ietf;
const gccipher xsalsa20, xsalsa2012, xsalsa208;
/*----- Generic random number generator interface -------------------------*/
-/* --- @salsa20{,12,8}_rand@, @xsalsa20{,12,8}_rand@ --- *
+/* --- @salsa20{,12,8}{,_ietf}_rand@, @xsalsa20{,12,8}{,_ietf}_rand@ --- *
*
* Arguments: @const void *k@ = pointer to key material
* @size_t ksz@ = size of key material
* @const void *n@ = pointer to nonce or null
- * (@SALSA20_NONCESZ@ or @XSALSA20_NONCESZ@)
+ * (@SALSA20_NONCESZ@, @SALSA20_IETF_NONCESZ@,
+ * or @XSALSA20_NONCESZ@)
*
* Returns: Pointer to generic random number generator instance.
*
const void */*n*/);
extern grand *salsa208_rand(const void */*k*/, size_t /*ksz*/,
const void */*n*/);
+extern grand *salsa20_ietf_rand(const void */*k*/, size_t /*ksz*/,
+ const void */*n*/);
+extern grand *salsa2012_ietf_rand(const void */*k*/, size_t /*ksz*/,
+ const void */*n*/);
+extern grand *salsa208_ietf_rand(const void */*k*/, size_t /*ksz*/,
+ const void */*n*/);
extern grand *xsalsa20_rand(const void */*k*/, size_t /*ksz*/,
const void */*n*/);
extern grand *xsalsa2012_rand(const void */*k*/, size_t /*ksz*/,