Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux support #1

Open
666threesixes666 opened this issue Jun 4, 2015 · 1 comment
Open

linux support #1

666threesixes666 opened this issue Jun 4, 2015 · 1 comment

Comments

@666threesixes666
Copy link

linux support plz? =D i love my chaos

@henricj
Copy link
Owner

henricj commented Jun 4, 2015

The nist_rng code should work with any reasonable ANSI C compiler. Is there some specific compilation problem you are having? Which platform/architecture are you targeting?

The bits one would typically use are nist_ctr_drbg.c, nist_ctr_drbg.h, nist_ctr_drbg_aes256.h (or nist_ctr_drbg_aes128.h), and nist_config.h. Apart from AES/Rijndael, the rest of the files provide debug/diagnostic support. While a generic, C-based Rijndael implementation is included, one is likely to have a superior platform-specific solution. Even if ISA extensions like Intel's AES-NI or the ARMv8 cryptographic extension are not available, a platform-optimized solution is likely to be both faster and involve less code duplication (which could get particularly expensive if one needs FIPS validation or the like). More critically, some supply of entropy is absolutely essential to the proper operation of a cryptographic RNG/RBG and that is well beyond the scope of this particularly project.

That leaves only one core *.c file, which seemed a bit on the small for a stand-alone library that would then need some kind of dynamic configuration mechanism to choose the block cipher implementation at runtime instead of at compile time.

A more complete example to consider might be csrng. I have not reviewed that code, so I make no claim beyond that the scope of the project, as described on its main project page, encompasses a more complete example of a cryptographic random number generator (including entropy input, output validation, and such). Note that it uses a modified version of nist_ctr_drgb.c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants