vlang / libsodium Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
When I want to generate a new verify key I call this method new_signing_key
and then it will generate a new signing key containing verify_key
and public_key
inside it.
verify_key: libsodium.VerifyKey{
public_key: [3,21,......]
}
}
What i want to access this public_key, I did
verify_key.public_key
and because this is not public I can't access it and got this error
error: field `libsodium.VerifyKey.public_key` is not public
so there is any way to do it or i can edit it and make a pull request?
thanks
Hi,
I've followed official libsodium docs and implemented typesafe abstractions over those functions. Goal was to prevent abuse and get better error checking.
It depends on PR #11
You can find them in following branch https://github.com/d-p-y/libsodium/tree/extensions
Question: would you be interested in upstreaming those changes into vlang/libsodium in some form?
sign with private key
use public key to test the signature
e.g. https://pynacl.readthedocs.io/en/latest/signing/#example
Hi,
can you please specify license for this repo? I would like to contribute but lack of license causes uncertainty.
Thank you
Great to see libsodium support for V! I am finding a way to securely store user passwords, is there any plan to support crypto_pwhash?
Edit
Currently trying to giving a try to contribute with the few C skill I have ๐
in all example priv key is being generated
we need a way how to import a key
eg.
https://libsodium.gitbook.io/doc/secret-key_cryptography/encrypted-messages
maybe we need to make some nicer vlang wrapper for it if possible
python version, good to see how they made it easy from python
https://pynacl.readthedocs.io/en/latest/secret/#example
I can't use private key encryption because nonce is different for the client and the server. Is there a way to use libsodium to encrypt and decrypt with the same private key on the client and on the server ?
Thanks per advance ๐
think https://libsodium.gitbook.io/doc/public-key_cryptography/authenticated_encryption can be used as example
in python there are good examples as well
https://pynacl.readthedocs.io/en/latest/public/#nacl-public-box
purpose is to encrypt with public key of destination
destination person uses private key to decrypt
Curve25519 should be the std
I use currently use smallstep cli for secretbox encryption and I thought it would be nice to rewrite the command in V.
The code was very easy to write. However, current V secretbox implementation does not expose the nonce so it is not possible to inter-operate with smallstep cli, or even with another V process.
My workaround was to to make nonce pub mut
in smallstep.v, and change the type from current [24]byte to []byte. I now pass the nonce on the command line to both smallstep and my sbox cli.
Thank you for porting libsodium to V!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.