Giter Site home page Giter Site logo

Allow odd full rounds about neptune HOT 5 CLOSED

lurk-lab avatar lurk-lab commented on September 9, 2024
Allow odd full rounds

from neptune.

Comments (5)

porcuquine avatar porcuquine commented on September 9, 2024

I think Poseidon is required to have an even total number of full rounds (R_F)— because the same number of full rounds (R_f) is specified to occur both before and after the partial rounds. This is from page 6 of the current version of the paper:

image

What makes you think an odd number of full rounds is permissible?

from neptune.

porcuquine avatar porcuquine commented on September 9, 2024

This requirement also appears to be encoded in the way the full round numbers are calculated. The implementation of calc_round_numbers appears to only ever return values for rf which are multiples of 2. (Candidates begin from two and are only ever incremented by 2.)

https://github.com/filecoin-project/neptune/blob/3539d70d542f77d3634e02df845dfa233bf604b4/src/round_numbers.rs#L25-L48

from neptune.

DrPeterVanNostrand avatar DrPeterVanNostrand commented on September 9, 2024

Ok, that makes sense, I forgot about the step_by(2). I was going from the security inequalities in the paper which never require an even R_F, just that the tuple (R_F, R_P) minimizes the number of S-boxes. Also the paper uses the the symbol R_F/2 which is ambiguous, but I assumed to be integer division.

from neptune.

DrPeterVanNostrand avatar DrPeterVanNostrand commented on September 9, 2024

So I'll close this issue now that you pointed out the step_by(2), I hadn't looked at that piece of code in a while because it's not actually in the paper.

from neptune.

porcuquine avatar porcuquine commented on September 9, 2024

Sounds good. I think it makes sense to keep the panic!, but maybe change the text and remove the comment suggesting that anything needs to change. This is a code path that shouldn't be possible to hit, so panicking if we do is appropriate and documents that invariant.

from neptune.

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.