Git Product home page Git Product logo

octavo's People

Contributors

gitter-badger avatar hauleth avatar homu avatar jubalh avatar justi avatar kazuki avatar palaviv avatar silmeth avatar steveklabnik avatar valarauca avatar yberreby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

octavo's Issues

Constant Time Story

Currently Octavo seems to pay very little attention to resisting side-channel attacks (see e.g. the use of data-dependent array indices in blowfish and the use of noncryptographic big integers in RSA). While this isn't critical for some cryptographic settings, many applications (e.g. TLS) can easily be broken by timing attacks. Octavo should probably decide what its plan is.

ChaCha20 only encrypts partial content, when invoked repeatedly

The ChaCha20 implementation is broken in a way that repeatedly calling ChaCha20::encrypt_stream() skips some of the input bytes. Specifically this happens if any of the calls input parameters is not a multiple of the block size.

Here is a small example demonstrating this:

extern crate octavo;

use octavo::crypto::stream::chacha20::ChaCha20;
use octavo::crypto::stream::StreamEncrypt;

fn main() {
    let mut s = ChaCha20::new(b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", b"cccccccccccc");

    let a = [0u8; 63];
    let mut outa = [0u8; 63];
    let b = [0u8; 64];
    let mut outb = [0u8; 64];

    s.encrypt_stream(&a[..], &mut outa[..]);
    s.encrypt_stream(&b[..], &mut outb[..]);

    println!("{:?}", &outa[..]);
    println!("{:?}", &outb[..]);
}

Since there is absolutely no documentation, this could of course be intended behaviour. However, I would argue that this is a very common use-case with data received from a network connection.

AES

Would it be possible to port libraries from the Iron Crypto framework to this library?

I'd be willing to start porting over crates.

Revise Octavo `digest` structure

Currently I found that using octavo::digest is quite verbose, ex.:

use octavo::digest::Digest;
use octavo::digest::sha1::Sha1;

I am thinking about making all modules private and reexport hash functions as all of them currently has unique names (some ugly as Sha3224). But I am not so sure about it. What you guys think?

There are 3 options:

  • left as is
  • privatize and reexport
  • left as is and simplify Sha3XXX names to ShaXXX (possible name collisions between octavo::digest::sha2 and octavo::digest::sha3).

Make digest pass tests for vectors from NIST for longer messages

Now SHA2 implementations do not pass all of the tests from NIST documents, they have problems with hashing messages longer than one block. Those longer test vectors can be found on:

Current implementation does not check those and when added, does not pass them for bigger hashes (SHA-384, SHA-512, and when added, SHA-512/224 and SHA-512/256).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.