@li0ard/dstu
v0.2.0
Published
DSTU cryptography algorithms in pure TypeScript
Maintainers
Readme
Installation
npm i @li0ard/dstuSupported algorithms
- Curves and ECDSA (DSTU 4145-2002)
- Supports polynomial and optimal normal basis
- Supports ECDH and encryption
- 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
Supported cipher modes
- Cipher Block Chaining mode (CBC)
- Counter with CBC-MAC mode (CCM)
- 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)
Supported curves
| Bits | Polynomial(PB) | Optimal normal(ONB) | Test curve | |:----:|:------------------:|:-----------------------:|:----------:| | 163 | ✅ | | ✅ | | 167 | ✅ | | | | 173 | ✅ | ✅ | ✅ (ONB) | | 179 | ✅ | ✅ | | | 191 | ✅ | ✅ | | | 233 | ✅ | ✅ | | | 257 | ✅ | | | | 307 | ✅ | | | | 367 | ✅ | | | | 431 | ✅ | ✅ | |
