Skip to Content
oxcrypto

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.

StandardSTB 34.101.31-2020 (Belarusian national standard).
Cratebelt-dwp 0.1.1
MaturityStable release. No published audit.
MSRVBuilds with Rust 1.88.
Zeroizationbelt-block and belt-ctr with zeroize are written to wipe the BelT round keys and the CTR state. oxcrypto has not verified this independently.
ExperimentalNo
Test vectorsbelt-dwp crate vectors (STB 34.101.31-2020 appendix)