urbit/pkg/urcrypt
2022-05-06 22:57:57 +00:00
..
argon2 Merge commit '0b3f9a629f864ad1e68c5f5a73d11c93ae42d644' into jb/urcrypt-merge 2021-08-19 20:05:34 -04:00
build-aux/m4 mid-autoconfiscation of urcrypt 2020-10-03 15:15:14 -07:00
ed25519 Merge remote-tracking branch 'frodwith/urcrypt' into jb/urcrypt-prep 2021-08-19 20:03:19 -04:00
ge-additions obliterate ge-additions package, move to urcrypt 2020-10-02 09:08:56 -07:00
keccak-tiny Merge commit '5513eaf62ae0e19ced43238537bdc81c97eda11d' as 'pkg/urcrypt/keccak-tiny' 2021-09-20 12:53:38 -07:00
scrypt Merge commit 'a06fc1416581772e8eddfa20001d131dea5bed64' as 'pkg/urcrypt/scrypt' 2020-10-10 13:23:46 -07:00
urcrypt urcrypt: correct parameter ordering in urcrypt_ed_veri() 2022-05-06 22:57:57 +00:00
.gitignore build: gitignore urcrypt build results 2021-08-19 20:31:13 -04:00
autogen.sh add autogen.sh 2020-10-05 11:01:22 -07:00
configure.ac urcrypt: first pass at schnorr signatures 2021-12-30 04:16:37 +00:00
liburcrypt.pc.in pkg-config support for urcrypt, update urbit build 2020-10-09 13:40:31 -07:00
Makefile.am Merge branches 'jb/rnv-restage' and 'jb/rnv-fixes', remote-tracking branches 'frodwith/keccak' and 'botter-nidnul/release/next-vere' into jb/rnv-merge 2021-09-24 18:05:37 -04:00
README.md require shared ssl when building a shared urcrypt 2020-10-06 14:23:22 -07:00
shell.nix Merge remote-tracking branch 'frodwith/urcrypt' into jb/urcrypt-prep 2021-08-19 20:03:19 -04:00

What is urcrypt?

urcrypt is a library of cryptography routines used by urbit jets.

Why is urcrypt?

Urbit's C runtime (long the only urbit runtime) has accumulated a collection of cryptography dependencies, some with custom additions or patches. These libraries have different conventions and have been managed by u3 in an ad-hoc manner. Reproducing that arrangement in other runtimes is tricky and error-prone. The (sometimes inconsistent) logic must be reproduced and suitable cryptography primitives must be found (or worse, written) for the new environment.

To ease these burdens, urcrypt isolates the quirks behind a consistent calling convention. Everything is a little-endian byte array, and each jetted operation has a corresponding function in the library. Jets simply unpack their nouns, call urcrypt, and pack the results.

What is a cryptography routine?

This is more of a subjective question than it might appear. Any of the following conditions are sufficient, but not necessary, for a function to be included in urcrypt:

  • The routine is sensitive to side-channel attacks (encryption, etc)
  • Some property of the routine is cryptographically useful (SHA, RIPE, etc)
  • The routine typically lives in a crypto library, for whatever reason.

A word on OpenSSL

Urcrypt depends on OpenSSL's libcrypto, which has global state. In order to avoid dealing with this state, urcrypt refuses to build with an internal libcrypto. Either build statically (pass --disable-shared to ./configure) or provide a shared libcrypto for urcrypt to link against. It is the library user's responsibility to initialize openssl, set custom memory functions, etc.