Git Product home page Git Product logo

hpc's People

Contributors

neilsagarwal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

hpc's Issues

Add an option to allow using more one KX table

In the Richard Schroeppel's page about HPC there are some citations about more than one KX Table in the cipher:

"Although indefinite size keys are allowed, there are in effect only 2^16384 distinct keys. (If all five tables are considered, then there are 81920 bits of key.)"

/\ https://web.archive.org/web/20211130025215if_/http://richard.schroeppel.name:8015/hpc/hpc-overview

"Each subcipher has a KX (key expansion) table, 256 words of 64-bits, pseudo-randomly generated from the key. All five tables may be computed when a key is setup, or the tables may be computed when needed. An application which only used a few blocksizes would need only a subset of the tables. The same algorithm is used for each KX table, changing only an initialization. The KX tables are firewalled: knowing a KX table won't help find the original key, or a KX table for a different subcipher."

/\ https://web.archive.org/web/20120722092329/http://richard.schroeppel.name:8015/hpc/

==============================================

It would be a good idea to implement it.

[Question] What is the largest key size accepted by HPC?

I found at this page (https://www.schneier.com/books/applied-cryptography-source), this file which is a C implementation of HPC: https://www.schneier.com/wp-content/uploads/2015/03/HPC-2.zip

It mixes up to 256bits of a key with the KX table.

    l_key[0][1] ^= io_swap(in_key[0]); l_key[0][0] ^= io_swap(in_key[1]);
    l_key[1][1] ^= io_swap(in_key[2]); l_key[1][0] ^= io_swap(in_key[3]);

    if(key_len > 128)
    {
        l_key[2][1] ^= io_swap(in_key[4]); l_key[2][0] ^= io_swap(in_key[5]);
    }

    if(key_len > 192)
    {
        l_key[3][1] ^= io_swap(in_key[6]); l_key[3][0] ^= io_swap(in_key[7]);
    }

After that, the 249th 64 bit word is processed in the algorithm:

    for(i = 0; i < 8; ++i)
    {
        s[i][0] = l_key[248 + i][0]; s[i][1] = l_key[248 + i][1];
    }

I'm really confused, the author says it's a variable key size cipher, as I read in this C implementation the maximum key size could be 248 words of 64 bits (15872 bit key), am I right?

What is the largest key size accepted by HPC? Do you know?

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.