Code Monkey home page Code Monkey logo

rust-xoodyak's Introduction

GitHub CI

Xoodyak for Rust

This is a Rust implementation of Xoodyak, a cryptographic primitive that can be used for hashing, encryption, MAC computation and authenticated encryption.

  • no_std-friendly
  • Lightweight
  • Can be compiled to WebAssembly/WASI
  • Session support
  • Safe Rust interface
  • AEAD with attached and detached tags
  • In-place encryption
  • Ratcheting
  • Variable-length output hashing, authentication
  • squeeze_more(), absorb_more() for streaming.

rust-xoodyak's People

Contributors

codahale avatar dependabot-preview[bot] avatar jedisct1 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

Watchers

 avatar  avatar  avatar

Forkers

dvc94ch

rust-xoodyak's Issues

Wrong test vector?

rust-xoodyak/src/test.rs

Lines 18 to 29 in 449e8e2

fn test_unkeyed_empty() {
let mut st = XoodyakHash::new();
let mut out = [0u8; 32];
st.squeeze(&mut out);
assert_eq!(
out,
[
141, 216, 213, 137, 191, 252, 99, 169, 25, 45, 35, 27, 20, 160, 165, 255, 204, 246, 41,
214, 87, 39, 76, 114, 39, 130, 131, 52, 124, 189, 128, 53
]
);
}

The hash of the empty string should be EA152F2B47BCE24EFB66C479D4ADF17BD324D806E85FF75EE369EE50DC8F8BD1 which translates to [234, 21, 47, 43, 71, 188, 226, 78, 251, 102, 196, 121, 212, 173, 241, 123, 211, 36, 216, 6, 232, 95, 247, 94, 227, 105, 238, 80, 220, 143, 139, 209].

The root of this issue would be the use of [u8].chunks(rate) in absorb_any etc. instead of Split(X, n) as defined on page 10 of the specification.

Note that adding st.absorb(&[]); to the snippet above does not change the result, but it should (pp. 8–9).

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.