Code Monkey home page Code Monkey logo

Comments (4)

AKushWarrior avatar AKushWarrior commented on July 20, 2024 1

And to you. Quite honestly, I don't really care if you used this package. What matters is that you were able to achieve the functionality on dart, which you did.
Good luck on all your future coding endeavors.

from steel_crypt.

AKushWarrior avatar AKushWarrior commented on July 20, 2024
  1. As for keeping only the public key, it's fairly simple, only fetch the public key. The private key will still be encoded into a keypair in the class itself, meaning you only need the one. However, I might ask, why do you need to encrypt only and not decrypt? (This is so that I might be able to improve runtime efficiency and/or features of the package.)

  2. Alright, so I assume you did something like this (post a code snippet if it's a different issue):
    var encrypter = new RsaCrypt(); var pubKey = encrypter.pubKey; print(pubKey); //Which prints "Instance of RSAPublicKey"
    SteelCrypt exposes PointyCastle's RSA AsymmetricKeyPair class, which in turn contains two keys, one of which is an RSAPublicKey and the other is an RSAPrivateKey. However, both of these classes contain no useful string representation, meaning that there is no way to "see" the value of the keys. The keys still exist, so, while you can't really print them, you can definitely use the public key to encrypt by using the .pubKey getter of the RsaCrypt() class.

I hope this answers your questions, but on the chance it didn't, make sure to comment back ASAP, as I have a relatively free schedule the next couple days. Cheers!

from steel_crypt.

ukeOnFire avatar ukeOnFire commented on July 20, 2024

Thanks for your kind reply. I will try to explain the situation more detailed and as simple as I can:
I have a mobile app. The user has to login and send his credentials. I am not using firebase, so I have to ensure myself that those credentials are sent securely. To do that, I want the mobile app to get the public key from my backend, encrypt the credentials with it, and send them back to the backend.
So what I really want to do is have a RsaCrypt()-object that uses the public key sent from my backend.

Cheers!

from steel_crypt.

ukeOnFire avatar ukeOnFire commented on July 20, 2024

Just wanted to let you know that I found a work around (sadly, not by using this package...).
Anyway, thanks and jolly coding!

from steel_crypt.

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.