Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LucaWolf/des.nim
DES/3DES, DUKPT and MAC in Nim language
https://github.com/LucaWolf/des.nim
Last synced: 3 months ago
JSON representation
DES/3DES, DUKPT and MAC in Nim language
- Host: GitHub
- URL: https://github.com/LucaWolf/des.nim
- Owner: LucaWolf
- License: mit
- Created: 2016-07-18T19:04:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-24T10:10:27.000Z (about 5 years ago)
- Last Synced: 2024-05-18T15:41:14.076Z (6 months ago)
- Language: Nim
- Homepage:
- Size: 321 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nim - des - DES/3DES, DUKPT and MAC in Nim. (Algorithms / Cryptography)
README
des.nim
=======[![Build Status](https://travis-ci.org/LucaWolf/des.nim.svg?branch=master)](https://travis-ci.org/LucaWolf/des.nim)
About
-----
This is a Nim port of a C-based DES implementation. It implements single, double and triple DES operations with support for basic data padding.
DUKPT simple key management (PEK is cached, not holding the future keys array) with encrypt/decrypt and MAC operations also supported.Examples
--------
Refer to the `test` folder for how to DES crypt/decrypt and DUKPT current key(s) derivation.Notes
-----
- only the mostly used CBC and ECB modes are implemented. Nowadays, ECB is only useful as an internal helper routine, do not encode your data that way.
- pay attention to resetting the IV when starting a different logical operation (IV is cached to allow manual chaining)
- all operations are based on complete input data. For streams, your may want to enhance or build atop the existing implementation. The last processed block may require special handling (see MAC X9.19)Future
------
None. All desired operations are now supported. (low priority: perhaps incrementing the internal KSN field and deriving the keys based on it)Credits
-------
Thanks to the libtomcrypt authors on whose work this library is based.