@li0ard/dstu
DSTU cryptography algorithms in pure TypeScript
docs
npm i @li0ard/dstu- Curves and ECDSA (DSTU 4145-2002)
- Supports polynomial and optimal normal basis
- Kalyna cipher (DSTU 7624:2014)
- Kupyna hash function (DSTU 7564:2014)
- Supports KMAC
- Strumok stream cipher (DSTU 8845:2019)
- ECIES encryption schema over Twisted Edwards curves (DSTU 9041:2020)
- DSTU 9311:2024 cipher (republished DSTU GOST 28147:2009)
- GOST 34.311-95 hash function over DSTU 9311:2024
- Supports HMAC
- Cipher Block Chaining mode (CBC)
- Counter with CBC-MAC (CCM) mode
- Cipher Feedback mode (CFB)
- Counter mode (CTR)
- Electronic Codebook mode (ECB)
- Galois Counter mode (GCM)
- Message Authentication Code mode (MAC and GMAC)
- Output Feedback mode (OFB)
- Key wrapping (KW)
- Supports
Dstu7624Wrap/GOST28147Wrap
- Supports
- XEX Tweakable Block Ciphertext Stealing (XTS)
| Bits | Polynomial (PB) |
Optimal normal (ONB) |
Test curve |
|---|---|---|---|
| 163 | ✅ | ✅ | |
| 167 | ✅ | ||
| 173 | ✅ | ✅ | ✅ (ONB) |
| 179 | ✅ | ✅ | |
| 191 | ✅ | ✅ | |
| 233 | ✅ | ✅ | |
| 257 | ✅ | ||
| 307 | ✅ | ||
| 367 | ✅ | ||
| 431 | ✅ | ✅ |