Git Product home page Git Product logo

Comments (8)

tarcieri avatar tarcieri commented on June 16, 2024 1

Sure, that'd be appreciated

from stream-ciphers.

tarcieri avatar tarcieri commented on June 16, 2024 1

Yeah, we don't currently support 128-bit Salsa20 or have plans to work on it. I'd consider it esoteric and not used in practice.

from stream-ciphers.

oxarbitrage avatar oxarbitrage commented on June 16, 2024

I was doing some research here and i ended up creating a little script to convert the data to JSON which i think it might be more useful in general than the old format used in the eSTREAM project:

https://github.com/oxarbitrage/salsa20-ecrypt-vectors-converter

So the files i was planning to use here are https://github.com/oxarbitrage/salsa20-ecrypt-vectors-converter/blob/main/test_vectors_128.json and https://github.com/oxarbitrage/salsa20-ecrypt-vectors-converter/blob/main/test_vectors_256.json

In order to use that i will have to add a few dev dependencies in https://github.com/RustCrypto/stream-ciphers/blob/master/salsa20/Cargo.toml#L18

The dependencies i will need are serde, seder-json and hex. I think that should be fine as they are only dev dependencies but that will mean a bit of more work in the repo as dependabot will submit pull requests to upgrade them as needed.

There might be other reasons for not adding more dev dependencies i am not seeing so i preferred to ask first if that will be ok or not. I can think on other alternatives if this is a problem.

Thanks!

from stream-ciphers.

tarcieri avatar tarcieri commented on June 16, 2024

We have a standard format for test vectors implemented by the blobby crate cc @newpavlov

from stream-ciphers.

newpavlov avatar newpavlov commented on June 16, 2024

I can do conversion into the blobby format. If we want to use the standard test macros from the cipher crate, I suggest we use only the vectors which end with 448..511 with blanks in streams filled by our implementation.

I am not sure how the xor-digest field works. Is it result of XORing every 64 byte chunk until last chunk provided in a vector?

from stream-ciphers.

oxarbitrage avatar oxarbitrage commented on June 16, 2024

The only thing i was able to find for the xor-digest is https://www.cosic.esat.kuleuven.be/nessie/testvectors/sc-title.html

Unsure if we will want to test it.

from stream-ciphers.

oxarbitrage avatar oxarbitrage commented on June 16, 2024

I was thinking on testing all the stream outputs similar to how it is done in https://github.com/RustCrypto/stream-ciphers/blob/master/salsa20/tests/mod.rs#L92-L99 but i will be happy to try whatever you guys think it will be the best.

from stream-ciphers.

oxarbitrage avatar oxarbitrage commented on June 16, 2024

I this this research in a separated branch, i wanted to figure out if this implementation pass the ecrypt tests and it does: oxarbitrage#1

But i was able to test only the 256 bit key sizes as the 128 ones are not supported.

from stream-ciphers.

Related Issues (20)

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.