katzenpost / katzenpost

Katzenpost is a free and open source software project dedicated to researching and developing mix network protocols
GNU Affero General Public License v3.0
84 stars 16 forks source link

breakout cryptography into a new git repo #454

Closed david415 closed 2 months ago

david415 commented 8 months ago

This is a code organization and code migration task. We wish to migrate all the cryptography code that is inside this katzenpost monorepo into a new cryptography repo which for the time being we are calling hpqc - hybrid post quantum cryptography.

Much of this code migration is straight forward and requires very very minimal code changes and import path changes. However there are various cryptographic packages lurking outside of core/crypto package. I'll be fishing out ALL the cryptography and organizing it into a new hierarchy.

Besides code migration of existing modules/packages, we also need to write wrappers for the basics like hash functions, stream cipher, aead etc.

This task has 3 main goals:

  1. we never call cryptography libraries directly from the katzenpost monorepo, but always use hpqc for every cryptographic operation; this ensures that all the cryptography mistakes happen inside hpqc instead of being spread out over many hierarchies throughout the katzenpost monorepo. it focuses all the cryptography in one place.
  2. provide a reusable cryptography library that other golang projects can use
  3. maintain pq cryptographic primitives that are not currently being maintained in a timely manner

We'll have some unique features in this cryptography library that are somewhat innovative and very useful such as:

There's also the idea that we are now maintaining a fork of Yawning's nyquist, the only PQ Noise implementation in the world. Our nyquist fork has it's own repo which is convenient for pulling upstream. But I think it's an advantage to lift nyquist into the hpqc repo in order to quickly and easily make code changes; namely making it NOT depend on circl... in fact, ALL the cryptography primitives that nyquist uses should be primitives that are wrapped in hpqc.

david415 commented 2 months ago

done