AuroraRuntime/Source/Crypto/ECC/PrivateECCImpl.hpp
Reece Wilson 0ded2ec77c [*] potential bug in x25519 sign: was using the linear base ptr instead of write after alloc or validate
[*] old copy/pasted ecdh function clearly wasnt tested in its now form :(
[*] clean up
2022-09-25 09:28:48 +01:00

30 lines
796 B
C++

#pragma once
namespace Aurora::Crypto::ECC
{
struct PrivateECCImpl : IECCPrivate
{
PrivateECCImpl(EECCCurve type, ecc_key &key);
~PrivateECCImpl();
bool Sign(const Memory::MemoryViewRead &plainText,
EHashType method,
Memory::ByteBuffer &out) override;
bool Sign(const Memory::MemoryViewRead &hash,
Memory::ByteBuffer &out) override;
bool ECDH(const AuSPtr<IECCPublic> &partnerPublic,
Memory::ByteBuffer &sharedKey) override;
bool AsPublicECC(Memory::ByteBuffer &out) override;
bool AsPrivateECC(Memory::ByteBuffer &out) override;
EECCCurve GetType() override;
private:
ecc_key _key;
EECCCurve _type;
};
}