Code Monkey home page Code Monkey logo

Comments (10)

wwwtyro avatar wwwtyro commented on September 24, 2024

This seems a reasonable application. I'll look into this.

from cryptico.

stephensprinkle-zz avatar stephensprinkle-zz commented on September 24, 2024

Great! If I develop a method for this I'll be sure to issue a pull request.

from cryptico.

booherbg avatar booherbg commented on September 24, 2024

Hi guys! We need this same functionality. Were you able to come up with a solution?

from cryptico.

stephensprinkle-zz avatar stephensprinkle-zz commented on September 24, 2024

Not a super elegant solution, but a quick + dirty solution that I've employed thus far is to have a shared private/public key (different than the specific user's private/public keys) that all peers have access to. Any message that ONLY needs verification of origination is encrypted with the shared public key & signed with the individual peer's private key. Included in the encrypted object that is sent is the originating public key.

On the receiving peer's end the message is decrypted with the shared private key and the signature verified and compared against the included public key of the (now decrypted) object to prove origination.

This was the best workaround I've come up with without doing more significant work.

If you're also needing full message encryption, after proof of origination, the receiving peer can pass back their public key via the method above, at which point a fully encrypted (meaning not using a shared private/public key) message between peers can be sent.

from cryptico.

booherbg avatar booherbg commented on September 24, 2024

Thanks Stephen. Not ideal, but it's something. Any tips on what other library or mechanism you'd use for just signing with private keys?

from cryptico.

stephensprinkle-zz avatar stephensprinkle-zz commented on September 24, 2024

Edit: Actually, give this a look, it might work (I've not used it) -- https://code.google.com/p/jscryptolib/

Honestly, none that I have seen yet for the scenario above in a pure js way.

from cryptico.

booherbg avatar booherbg commented on September 24, 2024

Hi guys. We ended up using forge. They have a nice RSA interface that we can just use for signing digests, which is our use case.
https://github.com/digitalbazaar/forge#rsa

from cryptico.

zimbatm avatar zimbatm commented on September 24, 2024

The Forge RSA implementation only allows public key encryption and private key decryption unfortunately.

from cryptico.

ericwooley avatar ericwooley commented on September 24, 2024

It seems to me that the original use case could be solved by having the recipients encrypt and send a random string, and the originator could send back the decrypted value.

from cryptico.

paulsimon99 avatar paulsimon99 commented on September 24, 2024

@ericwooley made a good suggestion. I tried to take the pubkey generated from cryptico and use that in openssl_public_encrypt() in php, it errs with:
openssl_public_encrypt(): key parameter is not a valid public key

Is there a way to convert the pubkey generated by cryptico to be useable by openssl?

from cryptico.

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.