liboctavo / octavo Goto Github PK
View Code? Open in Web Editor NEWHighly modular & configurable hash & crypto library
Home Page: http://liboctavo.github.io/octavo
License: MIT License
Highly modular & configurable hash & crypto library
Home Page: http://liboctavo.github.io/octavo
License: MIT License
The StreamEncrypt
and StreamDecrypt
traits are not public. As such ChaCha20 is unusable from outside octavo itself.
Other common traits might also be useful, such as Eq
, PartialEq
.
There are some minor mistakes in the README file.
Using pronto-clippy.
Line 6 in a01c28b
s/Octavio/Octavo
If you find security bug then contact me via mail [email protected] using mine PGP key
https://github.com/libOctavo/octavo/blob/master/docs/hauleth.asc is a 404.
Tests should run in order on:
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.
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.
Would it be possible to port libraries from the Iron Crypto framework to this library?
I'd be willing to start porting over crates.
The README.md reads:
[dependencies]
octavo = "*"
However, octavo isn't on crates.io as of writing, so this doesn't work.
We should make OpenSSL optional dependency or build it only on certain triplets to allow builds on Windows.
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:
Sha3XXX
names to ShaXXX
(possible name collisions between octavo::digest::sha2
and octavo::digest::sha3
).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).
Context: redox-os
error[E0658]: use of unstable library feature 'wrapping_int_impl' (see issue #32463)
Solution:
add #![feature(wrapping_int_impl)] to the crate attributes to enable to digest/src/lib.rs
Connected to #50
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.