AuroraRuntime/Source/Crypto/ECC/PublicECCImpl.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

27 lines
671 B
C++

#pragma once
namespace Aurora::Crypto::ECC
{
struct PublicECCImpl : IECCPublic
{
PublicECCImpl(EECCCurve type, ecc_key &key);
~PublicECCImpl();
bool Verify(const Memory::MemoryViewRead &hash,
const Memory::MemoryViewRead &signature) override;
bool Verify(const Memory::MemoryViewRead &plaintext,
const Memory::MemoryViewRead &signature,
EHashType method) override;
bool AsPublicECC(Memory::ByteBuffer &out) override;
EECCCurve GetType() override;
const ecc_key &GetKey();
private:
ecc_key _key;
EECCCurve _type;
};
}