MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / DiffieHellman

Method DiffieHellman

extra/yassl/src/crypto_wrapper.cpp:802–812  ·  view source on GitHub ↗

server Side DH, client's view

Source from the content-addressed store, hash-verified

800
801// server Side DH, client's view
802DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g,
803 unsigned int gSz, const byte* pub,
804 unsigned int pubSz, const RandomPool& random)
805 : pimpl_(NEW_YS DHImpl(random.pimpl_->RNG_))
806{
807 using TaoCrypt::Integer;
808
809 pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
810 pimpl_->publicKey_ = NEW_YS opaque[pubSz];
811 memcpy(pimpl_->publicKey_, pub, pubSz);
812}
813
814
815// Server Side DH, server's view

Callers

nothing calls this directly

Calls 6

DHImplClass · 0.85
GetByteLengthMethod · 0.80
AllocKeysMethod · 0.80
GenerateKeyPairMethod · 0.80
IntegerClass · 0.50
InitializeMethod · 0.45

Tested by

no test coverage detected