version bumps, MAX_RECV_SEEN patch, FIPS interop, doc updates
Some checks failed
CI / lint (push) Failing after 49s
CI / test-python (push) Has been cancelled
CI / test (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-zig (push) Has been cancelled
CI / test-wasm (push) Has been cancelled
CI / build (push) Has been cancelled
CI / publish (push) Has been cancelled
CI / publish-wasm (push) Has been cancelled
CI / fuzz-regression (push) Has been cancelled
CI / publish-python (push) Has been cancelled
Some checks failed
CI / lint (push) Failing after 49s
CI / test-python (push) Has been cancelled
CI / test (push) Has been cancelled
CI / miri (push) Has been cancelled
CI / test-zig (push) Has been cancelled
CI / test-wasm (push) Has been cancelled
CI / build (push) Has been cancelled
CI / publish (push) Has been cancelled
CI / publish-wasm (push) Has been cancelled
CI / fuzz-regression (push) Has been cancelled
CI / publish-python (push) Has been cancelled
This commit is contained in:
parent
89f5be4f40
commit
e94b7e9ee7
17 changed files with 691 additions and 435 deletions
|
|
@ -294,7 +294,7 @@ Mistakes that compile successfully but produce incorrect or insecure behavior. A
|
|||
| `Internal` | -12 | `SOLITON_ERR_INTERNAL` | Structurally unreachable internal invariant violated (bug in soliton) |
|
||||
| `NullPointer` | -13 | `SOLITON_ERR_NULL_POINTER` | Null pointer passed for a required argument *(CAPI-only)* |
|
||||
| `UnsupportedFlags` | -14 | `SOLITON_ERR_FLAGS` | *(reserved — not currently returned; see footnote)* |
|
||||
| `ChainExhausted` | -15 | `SOLITON_ERR_CHAIN_EXHAUSTED` | Counter-space exhausted. Sources: ratchet send/recv counter reaches u32::MAX; call key chain advance limit (2²⁴ = 16,777,216 steps); per-epoch recv_seen set reaches 65536 distinct entries; streaming chunk index reaches u64::MAX |
|
||||
| `ChainExhausted` | -15 | `SOLITON_ERR_CHAIN_EXHAUSTED` | Counter-space exhausted. Sources: ratchet send/recv counter reaches u32::MAX; call key chain advance limit (2²⁴ = 16,777,216 steps); per-epoch recv_seen set would grow past 65535 distinct entries; streaming chunk index reaches u64::MAX |
|
||||
| `UnsupportedCryptoVersion` | -16 | `SOLITON_ERR_CRYPTO_VERSION` | Peer advertised a crypto version this library does not implement |
|
||||
| `InvalidData` | -17 | `SOLITON_ERR_INVALID_DATA` | Structurally invalid content (format error, co-presence violation, implausible values) |
|
||||
| `ConcurrentAccess` | -18 | `SOLITON_ERR_CONCURRENT_ACCESS` | Opaque handle is in use by another concurrent operation (reentrancy guard) *(CAPI-only)* |
|
||||
|
|
@ -420,7 +420,7 @@ All constants have type `&[u8]` (byte-string literals). In Rust, use `b"..."` no
|
|||
| `CALL_KEY_B_BYTE` | `&[u8]` | `&[0x05]` | Call key derivation, second call key |
|
||||
| `CALL_CHAIN_ADV_BYTE` | `&[u8]` | `&[0x06]` | Call chain key advance |
|
||||
| `HKDF_ZERO_SALT` | `[u8; 32]` | `[0u8; 32]` | LO-KEX HKDF salt (§5.4 Step 4) — 32 zero bytes |
|
||||
| `MAX_RECV_SEEN` | `u32` | `65536` | recv_seen set cap per epoch; 65536th distinct-counter decrypt succeeds, 65537th returns `ChainExhausted` |
|
||||
| `MAX_RECV_SEEN` | `u32` | `65536` | recv_seen set bound per epoch: a live set holds at most 65535 entries (`len < MAX_RECV_SEEN`); the 65536th distinct-counter decrypt returns `ChainExhausted` |
|
||||
| `MAX_CALL_ADVANCE` *(internal, not pub)* | `u32` | `16,777,216` (2²⁴) | `CallKeys::advance()` limit; `ChainExhausted` after this many calls. Not in `soliton::constants` — value for reimplementors only. |
|
||||
|
||||
---
|
||||
|
|
@ -1313,7 +1313,7 @@ pub fn encrypt(&mut self, plaintext: &[u8]) -> Result<EncryptedMessage>
|
|||
#[must_use = "decrypted plaintext contains sensitive data that must be consumed or zeroized"]
|
||||
pub fn decrypt(&mut self, header: &RatchetHeader, ciphertext: &[u8]) -> Result<Zeroizing<Vec<u8>>>
|
||||
// Err(DuplicateMessage) — counter already in recv_seen (state unchanged)
|
||||
// Err(ChainExhausted) — counter at u32::MAX, or recv_seen / prev_recv_seen set reached 65536 entries
|
||||
// Err(ChainExhausted) — counter at u32::MAX, or recv_seen / prev_recv_seen already holds 65535 entries
|
||||
// Err(InvalidData) — ratchet state previously zeroized by reset() or a prior AeadFailed (requires new KEX);
|
||||
// or ratchet step required but no KEM ct in header; or no send secret key
|
||||
// Err(DecapsulationFailed) — X-Wing KEM decapsulation failed
|
||||
|
|
@ -1348,8 +1348,8 @@ pub fn to_bytes(self) -> Result<(Zeroizing<Vec<u8>>, u64)> // consumes self; re
|
|||
// there is no recovery path. Call can_serialize() first; if false, do NOT call to_bytes().
|
||||
// Err(ChainExhausted) — send_count, recv_count, prev_send_count == u32::MAX, or epoch == u64::MAX
|
||||
// Err(InvalidData) — recv_seen or prev_recv_seen has ≥ 65536 entries (defense-in-depth dead branch:
|
||||
// decrypt's ChainExhausted guard fires at recv_seen.len() == 65536, preventing the set from growing
|
||||
// further, so this InvalidData path is unreachable in normal operation; the global error table lists
|
||||
// decrypt's ChainExhausted guard refuses the insert that would make recv_seen.len() == 65536, so a
|
||||
// live set never exceeds 65535 and this InvalidData path is unreachable in normal operation; the global error table lists
|
||||
// recv_seen exhaustion under ChainExhausted for this reason)
|
||||
#[deprecated(note = "Use from_bytes_with_min_epoch for anti-rollback protection")]
|
||||
pub fn from_bytes(data: &[u8]) -> Result<Self> // no rollback protection — always use from_bytes_with_min_epoch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue