2021-09-21 01:54:47 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Aurora::Crypto::ECC
|
|
|
|
{
|
2022-09-25 08:25:33 +00:00
|
|
|
struct PrivateECCImpl : IECCPrivate
|
2021-09-21 01:54:47 +00:00
|
|
|
{
|
|
|
|
PrivateECCImpl(EECCCurve type, ecc_key &key);
|
|
|
|
~PrivateECCImpl();
|
|
|
|
|
|
|
|
bool Sign(const Memory::MemoryViewRead &plainText,
|
2022-09-25 09:56:03 +00:00
|
|
|
Aurora::Hashing::EHashType method,
|
2022-01-20 16:04:53 +00:00
|
|
|
Memory::ByteBuffer &out) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
|
|
|
bool Sign(const Memory::MemoryViewRead &hash,
|
2022-01-20 16:04:53 +00:00
|
|
|
Memory::ByteBuffer &out) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
|
|
|
bool ECDH(const AuSPtr<IECCPublic> &partnerPublic,
|
2022-01-20 16:04:53 +00:00
|
|
|
Memory::ByteBuffer &sharedKey) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
2022-01-20 16:04:53 +00:00
|
|
|
bool AsPublicECC(Memory::ByteBuffer &out) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
2022-01-20 16:04:53 +00:00
|
|
|
bool AsPrivateECC(Memory::ByteBuffer &out) override;
|
2021-09-21 01:54:47 +00:00
|
|
|
|
|
|
|
EECCCurve GetType() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
ecc_key _key;
|
|
|
|
EECCCurve _type;
|
|
|
|
};
|
|
|
|
}
|