cauldron
libsodium
cauldron | libsodium | |
---|---|---|
25 | 30 | |
117 | 11,927 | |
- | - | |
1.2 | 8.7 | |
about 1 year ago | 6 days ago | |
C | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cauldron
-
Many floating-point numbers are in the interval (2017) [0,1]
I've previously written an algorithm that generates random floats in any [a,b], which can generate all possible floating point values, including subnormals, with the proper probability, and does so quickly for any choice of a and b. [0]
[0] https://github.com/camel-cdr/cauldron/blob/main/cauldron/ran...
-
Let's implement buffered, formatted output
The major advantage here is that you don't need to parse a dsl, and you can still have formatting options. A final api would probably use automatic compound literal struct arguments to implement default arguments with names parameters.
Type detection should also be possible, although you would need to register all print functions in a global macro.
This is just a proof of concept: https://github.com/camel-cdr/cauldron/blob/main/ideas/fmt.c
This is just a proof of concept: https://github.com/camel-cdr/cauldron/blob/main/ideas/fmt.c
-
SIMD-oriented Fast Mersenne Twister in C and non STD library discussion
It really depends on your use case, but I've written a header only PRNG library that might be interesting to you. I've also held a presentation about it, if you are interested in the specifics: "How computers generate random numbers (A guide for programmers)"
- C Posix complaint argument parsing in 42 loc, inspired by Duff's device
-
Fast Approximate Gaussian Generator
I've put it through an adapted version of testgauss.c, and it passed the test.
- Single header argument parsing, inspired by plan9's arg(3), in 45 loc
-
Designing a new PRNG (Jan 2021)
The entire romu-random.org family is faster than xoshiro256++, atleast in my benchmark:
-
Fast (pseudo) RNG?
Now for the self promo: If you are interested in random number generation, check out my presentation on the topic: https://www.youtube.com/watch?v=VHJUlRiRDCY You can also check out my random number library: https://github.com/camel-cdr/cauldron/blob/main/cauldron/random.h
-
How to Properly Benchmark C Code
For my benchmarking library, I use macros to tell the compiler not to optimize away a value, pre-running the benchmark to "warm up" the CPU/scheduler and calculate the average and deviation of multiple runs of the benchmark.
libsodium
-
Libsodium: A modern, portable, easy to use crypto library
Libsodium has been around for a while, so probably the reason it was posted is that version 1.0.19 was just released: https://github.com/jedisct1/libsodium/releases/tag/1.0.19-RE...
Updated NuGet and Swift packages are going to be uploaded soon.
AEGIS-128X and 256X are not there yet, but if you need them, they are available in libaegis: https://github.com/jedisct1/libaegis
All the code from libaegis will eventually be merged into libsodium, including the incremental update API which is especially useful for TLS.
- Libsodium 1.0.19 Released
- FLaNK Stack Weekly for 20 June 2023
-
Libsodium Still Relevant and Maintained?
To version the dependency you can check the current stable tree in git and save the date and git hash.
-
I created an encrypted command line jounal
To address both of these vulnerabilities, you should instead use a library that handles these sharp edges for you. A well received library in the security and cryptography communities is libsodium. It has high level functions that handle password hashing and data encryption for you, reducing the risk that you introduce vulnerabilities in your code, such as you have here.
-
Why can't I burn scam tokens by sending them to 0x000000000000000000000000000000000000dEaD?
In general, cryptography is really hard. So for example, an attacker could construct a message that if you signed would leak information, ie it reduces the space of possible keys such that it can be brute forced. I’m not entirely sure if you could do that with a transfer function. But it’s certainly possible. That said, there are a ton of smart devs trying to prevent that as well so I’m not assuming anything here. But prudent practices are likely good to follow. Be very careful calling anything from your cold wallet etc. Use disposable keys for anything a bit risky. I took a sec to google an example and this is the closest I could find. https://github.com/jedisct1/libsodium/issues/170
-
Some questions from a noob Rustacean
Hi everyone! I'm learning Rust while on a break between jobs, and as I'm particularly interested in interfacing Rust with C and in cryptography, I've decided to write a wrapper around libsodium (https://github.com/jedisct1/libsodium) in Rust. This is purely a hobby project and I probably won't ever release it as there are already some open-source Rust bindings available for the library.
-
Librandombytes – a public domain library for generating randomness
Can anyone recommend between Librandombytes and libsodium ramdombytes?
https://github.com/jedisct1/libsodium/tree/master/src/libsod...
What are some alternatives?
prvhash - PRVHASH - Pseudo-Random-Value Hash. Hash functions, PRNG with unlimited period, randomness extractor, and a glimpse into abyss. (inline C/C++) (Codename Gradilac/Градилак)
OpenSSL - TLS/SSL and crypto library
mersenne-twister-predictor - Predict MT19937 PRNG, from preceding 624 generated numbers. There is a specialization for the "random" of Python standard library.
Crypto++ - free C++ class library of cryptographic schemes
frand - A fast userspace CSPRNG
mbedTLS - An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
Criterion - A cross-platform C and C++ unit testing framework for the 21st century
libhydrogen - A lightweight, secure, easy-to-use crypto library suitable for constrained environments.
STC - A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers.
Botan - Cryptography Toolkit
dieharder - A fixed version of Robert G. Brown's "dieharder" tests for random number generators.
Bcrypt - Modern(-ish) password hashing for your software and your servers