Comments (2)
@kurnevsky I am new to Rust and this project.
I tried to make the change([u8; 32]
) locally and ran tests.
- I think the size of the array should be 91 since in
onion_announce.rs
ping_id function makes use ofONION_PING_DATA_SIZE
which is 91. I came across this while fixing the failing tests hence I think it should be 91. Please let me know if I should proceed with updating the array size to 91 - What changes are needed to be done for
and convert to PublicKey when needed
since ping_id_or_pk is an array after this change. - Is data_pk is needed on struct
OnionNode
after this change? since ping_id_or_pk is not a sha256::Digest or PublicKey after this change. - Is ping_id_or_pk(onion_announce_response) is combination of
ping_id
anddata_pk
forOnionNode
?
from tox.
- No, it should be 32 bytes - the length of curve25519 key and sha256 hash.
ONION_PING_DATA_SIZE
is the size of a data from which we calculate sha256 hash. - We treat
ping_id_or_pk
as a key or as a hash depending onAnnounceStatus
from a packet. So we just need to construct key and hash in the right places. - Yes,
ping_id_or_pk
is still either a hash or a key. We just want to store it as a plain array unless we don't know what exactly it is. - It's either a hash or a key.
from tox.
Related Issues (20)
- examples/echo.rs: remove hardcoded keys HOT 10
- Race in toxcore::tcp::client::client::tests::spawn HOT 3
- Replace IpPort::is_global with IpAddr::is_global from std
- Get rid of byteorder
- Return with custom ErrorKind at nom 5.0
- Remove custom GetPayloadError in favor of macro error_kind!
- ssh HOT 2
- ssh or vpn HOT 1
- Update cookie_factory from 0.2 to 0.3
- Move to async/await HOT 1
- Replace blocking Mutex with future Mutex HOT 8
- Failure is deprecated HOT 3
- AWTCY (AreWeToxClientYet)? HOT 8
- [Question] Can I send friend request with a message? HOT 2
- Replace PrecomputedCache's blocking Mutex with future Mutex
- Get rid of libsodium
- Api
- Question: tox-rs vs. c-toxcore - differences when deployed as server node HOT 4
- How to send file? 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 tox.