diff --git a/include/codecrypt.h b/include/codecrypt.h index 3917163..d3ef381 100644 --- a/include/codecrypt.h +++ b/include/codecrypt.h @@ -86,6 +86,7 @@ public: matrix sqInv; //"cache" int decrypt (const bvector&, bvector&); + int sign (const bvector&, bvector&, uint, prng&); }; class pubkey @@ -94,6 +95,7 @@ public: matrix G; uint t; int encrypt (const bvector&, bvector&, prng&); + int verify (const bvector&, const bvector&, uint); }; int generate (pubkey&, privkey&, prng&); @@ -107,9 +109,10 @@ namespace nd class privkey { public: - /*todo stuff*/ + // TODO int decrypt (const bvector&, bvector&); + int sign (const bvector&hash, bvector&sig, uint, prng&); }; class pubkey @@ -119,6 +122,7 @@ public: uint t; int encrypt (const bvector&, bvector&, prng&); + int verify (const bvector&sig, const bvector&hash, uint); }; int generate (pubkey&, privkey&, prng&); diff --git a/lib/mce.cpp b/lib/mce.cpp new file mode 100644 index 0000000..747cc87 --- /dev/null +++ b/lib/mce.cpp @@ -0,0 +1,30 @@ + +#include "codecrypt.h" + +using namespace ccr; +using namespace ccr::mce; + +int generate (pubkey&pub, privkey&priv, prng&rng) +{ + +} + +int pubkey::encrypt (const bvector& in, bvector&out, prng&rng) +{ + +} + +int privkey::decrypt (const bvector&in, bvector&out) +{ + +} + +int privkey::sign (const bvector&in, bvector&out, uint min_delta, prng&rng) +{ + +} + +int pubkey::verify (const bvector&in, const bvector&hash, uint missing) +{ + +} diff --git a/lib/nd.cpp b/lib/nd.cpp new file mode 100644 index 0000000..d264abc --- /dev/null +++ b/lib/nd.cpp @@ -0,0 +1,30 @@ + +#include "codecrypt.h" + +using namespace ccr; +using namespace ccr::nd; + +int generate (pubkey&pub, privkey&priv, prng&rng) +{ + +} + +int pubkey::encrypt (const bvector& in, bvector&out, prng&rng) +{ + +} + +int privkey::decrypt (const bvector&in, bvector&out) +{ + +} + +int privkey::sign (const bvector&in, bvector&out, uint min_delta, prng&rng) +{ + +} + +int pubkey::verify (const bvector&in, const bvector&hash, uint missing) +{ + +}