yggm/libs/keymanip.cuh

19 lines
553 B
Plaintext
Raw Normal View History

2025-03-15 01:38:00 +05:00
#ifndef __KEYMANIP_CUH
#define __KEYMANIP_CUH
struct ds64 {
char data[65];
};
struct ds46 {
char data[46];
};
2025-03-15 04:42:31 +05:00
using Addr16 = unsigned char[16];
2025-03-15 01:38:00 +05:00
using Key32 = unsigned char[32];
struct KeysBox32 {
Key32 PublicKey;
Key32 PrivateKey;
};
__device__ ds64 ktos(const unsigned char* key) noexcept;
__device__ ds46 getAddr(const unsigned char rawAddr[16]) noexcept;
2025-03-15 04:42:31 +05:00
__device__ void getRawAddress(int lErase, Key32& InvertedPublicKey, Addr16& rawAddr) noexcept;
2025-03-15 01:38:00 +05:00
__device__ void invertKey(const unsigned char* key, unsigned char* inverted);
#endif