https://github.com/windowsnt/sha3cng
A CNG implementation of new encryption algorithms
https://github.com/windowsnt/sha3cng
cng cplusplus crystals-dilithium crystals-kyber kyber sha3 sha3-256 sha3-384 sha3-512 win32
Last synced: about 2 months ago
JSON representation
A CNG implementation of new encryption algorithms
- Host: GitHub
- URL: https://github.com/windowsnt/sha3cng
- Owner: WindowsNT
- License: mit
- Created: 2023-01-10T20:34:42.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-15T16:51:42.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T13:21:30.631Z (2 months ago)
- Topics: cng, cplusplus, crystals-dilithium, crystals-kyber, kyber, sha3, sha3-256, sha3-384, sha3-512, win32
- Language: C++
- Homepage:
- Size: 44.6 MB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cngsha3
An implementation of New algorhtms into CNG (Cryptography New Generation) API so all Windows apps can use them.
Visual Studio 2022 Solution included.CodeProject Article: https://www.codeproject.com/Articles/5351727/cngsha3-A-Cryptography-Next-Generation-Implementat
# Algorithms
SHA-3 (using librhash https://github.com/rhash/RHash/tree/master/librhash)
Supports SHA-224, SHA-256, SHA-384 and SHA-512CRYSTALS-Kyber: https://github.com/itzmeanjan/kyber
Supports 512,768,1024 bitsCRYSTALS-Dilithium: https://github.com/itzmeanjan/dilithium
Supports 2,3,5CRYSTALS-Sphincs: https://github.com/itzmeanjan/sphincs
# Defines
The names are:```
const wchar_t* ProviderB = L"Michael Chourdakis CNG Implementations";
#define SHA3_224_ALGORITHM L"SHA3-224"
#define SHA3_256_ALGORITHM L"SHA3-256"
#define SHA3_384_ALGORITHM L"SHA3-384"
#define SHA3_512_ALGORITHM L"SHA3-512"
#define KYBER_512_ALGORITHM L"KYBER-512"
#define KYBER_768_ALGORITHM L"KYBER-768"
#define KYBER_1024_ALGORITHM L"KYBER-1024"
#define DILITHIUM_2_ALGORITHM L"DILITHIUM-2"
#define DILITHIUM_3_ALGORITHM L"DILITHIUM-3"
#define DILITHIUM_5_ALGORITHM L"DILITHIUM-5"
#define SPHINCS_ALGORITHM L"SPHINCS"```
# Instructions
* Install the Cryptographic Provider SDK (https://www.microsoft.com/en-us/download/details.aspx?id=30688)
* In both dll and test project properties, set the C++ include path to the above CNG SDK (mine is set at c:\Windows Kits\10\Cryptographic Provider Development Kit\include)
* Build the project
* The output dll.dll can be registered with regsvr32 (run as admin). You are ready to use the above names in CNG.
* Alternatively, run test as admin, it demonstrates a simple usage.