belt-dwp
Encrypt with the Belarusian belt-dwp authenticated encryption mode.
import os
from oxcrypto.aead.belt_dwp import BELT_DWP
key = BELT_DWP.BELT_DWP.generate()
nonce = os.urandom(16)
sealed = key.encrypt(nonce, b"message", associated_data=b"header")
plaintext = key.decrypt(nonce, sealed, associated_data=b"header")Variants: BELT_DWP.
Keys are 32 bytes, the nonce is 16 bytes and the tag is 8 bytes.
| Standard | STB 34.101.31-2020 (Belarusian national standard). |
| Crate | belt-dwp 0.1.1 |
| Maturity | Stable release. No published audit. |
| MSRV | Builds with Rust 1.88. |
| Zeroization | belt-block and belt-ctr with zeroize are written to wipe the BelT round keys and the CTR state. oxcrypto has not verified this independently. |
| Experimental | No |
| Test vectors | belt-dwp crate vectors (STB 34.101.31-2020 appendix) |