Coder Social home page Coder Social logo

Comments (9)

metadings avatar metadings commented on August 25, 2024

No, the zauth-like syntactic sugar is currently not in clrzmq4.

Please look into the ZSocket class.
You can use the socket options to run ZeroMQ on a CURVEd socket.
There are bool ZSocket.CurveServer, byte[] ZSocket.CurveSecretKey,
byte[] ZSocket.CurvePublicKey and byte[] ZSocket.CurveServerKey.

from clrzmq4.

james-cxx avatar james-cxx commented on August 25, 2024

Works like a charm. Thanks metadings!

from clrzmq4.

metadings avatar metadings commented on August 25, 2024

👍

from clrzmq4.

deanroker123 avatar deanroker123 commented on August 25, 2024

Hi metadings,

I am looking to implement this too, will zauth be in the bindings eventually?

How can you generate new keys to be used and saved?

Sorry if they are stupid questions, I am not that experienced at development.

Thanks

from clrzmq4.

metadings avatar metadings commented on August 25, 2024

wow hey, the ZAuthentication classes will take some time...

The privateKey of an authentication you get using a random number generator:

var privateKey = new byte[32];
using (var rng = new RNGCryptoServiceProvider()) rng.GetBytes(privateKey);

you could now calculate the publicKey using...

var publicKey = new byte[32];
crypto.box_keypair(publicKey, privateKey);

... if you use some library like jedisct1/libsodium!

from clrzmq4.

deanroker123 avatar deanroker123 commented on August 25, 2024

Hi Uli,

Thanks for the info, I will look into libsodium, it seems like a very
interesting library.

That should give me enough to get me going.

Unfortunately I'm not confident enough to be able to help with the zauth
work. I have never wrapped a c library in c# and wouldn't now where to
begin.

One other question. Is there anyway to convert a z frame directly to a
byte[]?

Thanks

Dean
On 4 Jun 2015 22:16, "Uli Riehm" [email protected] wrote:

wow hey, the ZAuthentication classes will take some time to develop...

The PrivateKey of an authentication you get using a random number
generator:

var privateKey = new byte[32];
using (var rng = new RNGCryptoServiceProvider()) rng.GetBytes(privateKey);

you could now calculate the PublicKey using...

var publicKey = new byte[32];
crypto.box_keypair(publicKey, privateKey);

... if you use some library like jedisct1/libsodium
https://github.com/jedisct1/libsodium/!


Reply to this email directly or view it on GitHub
#26 (comment).

from clrzmq4.

metadings avatar metadings commented on August 25, 2024

Yes, using

frame.Position = 0;
byte[] bytes = (ZFrame)frame.Read();

That's actually a very new method, you need to git pull origin master or just download the zip file.

I am going to post myself a crypto library tweetnacl.c and TweetNaCl.CSharp ... wait some hours!

from clrzmq4.

robreeves avatar robreeves commented on August 25, 2024

Could a curve example be added to https://github.com/metadings/zguide please? As someone not that familiar with curve this gives me some good clues to get started, but a hello world example with curve security would help a ton. Thanks!

from clrzmq4.

metadings avatar metadings commented on August 25, 2024

@rr118 you should open a new issue, I'm going to close this one...

from clrzmq4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.