Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate cryptography to rust #74

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

Commits on Mar 3, 2022

  1. feat(crypto): migrate cryptography to rust

    This comes with many benefits such as:
    
    - Speed. In fact, in our testing, backup times are slashed to under a
      second for 100 notes in debug mode. This can be improved by reducing
      memory copying and enabling hardware AES and SIMD in `rustc` flags.
    
    - Auditability. We use audited cryptography libraries such as `ring` and
      `aes-gcm` which provide better security.
    
    - Predictability. Due to the lack of a runtime, boxing and unboxing, the
      speed is predictable reducing many attacks which depend on timing
      information. The libraries are made to be run in constant-time which
      further improves security.
    
    Todo:
    
    - [ ] Setup build scripts to use hardware AES and SIMD when available
    - [ ] Remove debug log statements I added for testing
    - [ ] Improve error checking on the rust side
    - [ ] Setup build scripts for other platforms like `Linux`, `iOS`,
      `Android` and `macOS`. Current scripts only integrate with `windows`.
    
    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 3, 2022
    Configuration menu
    Copy the full SHA
    ef01ce2 View commit details
    Browse the repository at this point in the history

Commits on Mar 4, 2022

  1. notes: Use hardware AES, SIMD and LTO on windows for rust

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 4, 2022
    Configuration menu
    Copy the full SHA
    b170957 View commit details
    Browse the repository at this point in the history
  2. notes: add rust library support to android

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 4, 2022
    Configuration menu
    Copy the full SHA
    b467caf View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2022

  1. notes: add rust library support to iOS

    This relies on a build script hack as `cargo-xcode` uses wrong triplets
    for iOS simulator on x86_64 hosts.
    
    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    03c50c6 View commit details
    Browse the repository at this point in the history
  2. notes: add rust library support for macOS

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    a2db87c View commit details
    Browse the repository at this point in the history
  3. notes: add rust library support to linux

    It still needs testing though
    
    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    74b7a40 View commit details
    Browse the repository at this point in the history
  4. notes: remove webcrypto library from macOS

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    ff73280 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2022

  1. notes: Add build docs

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    afb5199 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2022

  1. notes: Add file format documentation

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    f9cf380 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2022

  1. notes: Improve error checking and recovery

    Signed-off-by: Akshit Garg <[email protected]>
    gargakshit committed Mar 11, 2022
    Configuration menu
    Copy the full SHA
    a42bb43 View commit details
    Browse the repository at this point in the history