Hs1sivhiv2
Misuse-resistant SIV mode built from ChaCha and an NH-based hash
Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Hs1sivhiv2
Hs1sivhiv2 is an authenticated encryption (AEAD) scheme from the HS1-SIV family. It uses a 32-byte (256-bit) key, a 12-byte nonce and a 32-byte (256-bit) authentication tag. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
HS1-SIV is a deterministic, nonce-misuse-resistant authenticated cipher that combines the HS1 universal hash with ChaCha in an SIV construction. It was a CAESAR round 2 candidate.
HS1 is a fast polynomial hash built on NH, the same inner-product hash used in UMAC and VMAC, followed by polynomial and inner-product stages. HS1-SIV hashes the associated data and plaintext into a synthetic IV, derives the tag from it with ChaCha, and then uses that tag as the nonce input for ChaCha encryption.
The specification defines three security levels that run the hash with one, two or four parallel lanes. NextSSL includes the version 2 hi and lo levels; the me (medium) level is not present.
History
2013–2019CAESAR competition for authenticated encryption announced
CAESAR competitionHS1-SIV published by Ted Krovetz
57 first-round candidates published
CAESAR competitionSecond round announced
CAESAR competitionThird round announced
CAESAR competitionFinalists announced
CAESAR competitionFinal portfolio: Ascon, ACORN, AEGIS-128, Deoxys-II, COLM and OCB
CAESAR competition
Security notes
Nonce reuse reveals only message equality. The lo level offers a reduced authenticity bound in exchange for speed and suits only settings where that is acceptable.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 32 | Secret key |
| nonce | 12 | Nonce / IV |
| tag | 32 | Authentication tag |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'unverified' is reachable from the root API only
key, nonce = root.random(32), root.random(12)
ct = root.call("aead_seal", "hs1sivhiv2", None, key, nonce, b"header", b"secret")[0] # ct || tag
pt = root.call("aead_open", "hs1sivhiv2", None, key, nonce, b"header", ct)[0]
nextssl_root_aead_seal("hs1sivhiv2", NULL, key, nonce, aad, pt, out); /* writes ct || tag */
nextssl_root_aead_open("hs1sivhiv2", NULL, key, nonce, aad, ct, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_aead_in(reg::all(), Policy::Any, "hs1sivhiv2", &Params::new())?;
let ct = alg.seal(&key, &nonce, b"header", b"secret")?;
let pt = alg.open(&key, &nonce, b"header", &ct)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Similar names
Looking for something else?More authenticated encryption
All 392Frequently asked questions
What is Hs1sivhiv2?
Hs1sivhiv2 is an AEAD in the HS1-SIV family. HS1-SIV is a deterministic, nonce-misuse-resistant authenticated cipher that combines the HS1 universal hash with ChaCha in an SIV construction.
What are the Hs1sivhiv2 sizes?
In NextSSL, Hs1sivhiv2 uses: key 32 bytes, nonce 12 bytes, tag 32 bytes.
Who designed Hs1sivhiv2 and when?
Hs1sivhiv2 belongs to the HS1-SIV family, first published in 2014 by Ted Krovetz. Its origin: CAESAR round 2 candidate.
Is Hs1sivhiv2 safe to use?
Hs1sivhiv2 is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
Related families
Nonce-misuse-resistant AES mode using POLYVAL and synthetic IVs (RFC 8452)
AES-SIVDeterministic authenticated encryption from CMAC-based S2V and AES-CTR (RFC 5297)
ChaCha20-Poly1305ARX stream cipher with a one-time Poly1305 MAC; fast and constant-time in software
ChaChaBernstein's ARX stream cipher; ChaCha20 secures much of today's TLS, SSH and VPN traffic