Comments (2)
cookie
now uses RustCrypto
for pure-Rust based cryptography, ideally resolving this issue.
from cookie-rs.
So cookie-rs really only needs the HMAC portion of Ring, which mostly involves hashing and then a constant-time comparison (see https://briansmith.org/rustdoc/src/ring/hmac.rs.html#390). Python's own constant time string comparison function can be found here: https://github.com/python/cpython/blob/d0d3e99120b19a4b800f0f381b2807c93aeecf0e/Modules/_operator.c#L727 . Could such a function be safely written in rust in this library? I see one attempt here https://github.com/cesarb/constant_time_eq/blob/master/src/lib.rs#L4 but I wonder how you would rigorously test that in practice it is actually constant time.
Additionally here is Golangs implementation, which unless I'm missing something, is pure Go and looks pretty straighforward: https://golang.org/src/crypto/subtle/constant_time.go
Update: I just realized that cookie also provides the ability to encrypt the cookies, which none of this would cover and would still need a solution.
from cookie-rs.
Related Issues (20)
- SameSite::None for unknown values? HOT 4
- Support optional weekday date format for Expires HOT 2
- v0.15.1 missing on crates.io HOT 4
- Nightly detection does not take into account whether features can actually be used HOT 9
- Panic when verifying malformed signed cookie HOT 2
- Parse multiple cookies in single string? HOT 1
- 0.16 release HOT 3
- Replace base64 with base64ct HOT 5
- Iterator over all cookies from string HOT 1
- Removing cookies by name HOT 4
- Private, signed & key methods missing
- Why was ring removed? HOT 1
- Commas are not encoded correctly
- Cookie builder doesn't ignore leading dots (as the `FromStr` implementation does) HOT 4
- Use `std::time::Duration` instead of `time::duration::Duration` for `max-age` HOT 1
- Trait bound error after upgrading to 0.17.0 HOT 1
- Support for `__Host-` cookies HOT 4
- Set Removal Cookies SameSite to Lax HOT 3
- Question : SignedJar::verify_result HOT 2
- aes-gcm vulnerability HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookie-rs.