none
Applying cryptography in a program RRS feed

  • General discussion

  • Greetings,

    I have been searching and learning about cryptography , encryption , decryption, methods and ... for a while. I have got a big question.

    Assuming 2 well-known encryption methods  Asymmetric and Symmetric , there always should be a key (either one key for both encryption and decryption ; Symmetric ,or  private and public keys ; Asymmetric). Thus, inevitably at least a key should be stored for a single encryption/decryption session. Now if I want to apply cryptography in a program of mine so as to keep output of my program safe (like strings , user info , ...) my program should always use a key which is stored somewhere to do the encryption and decryption each time needed . But where ?!

    It isn't logical to store it inside the program ; mostly unsafe. The same story with storing the key in Registry or even in an obscure location of file. How about servers ? I guess it's still unsafe

    Please provide me with your own experience and knowledge.

    Thanks in advance.

    Monday, August 6, 2018 2:12 PM

All replies

  • "Now if I want to apply cryptography in a program of mine so as to keep output of my program safe (like strings , user info , ...)"

    Can you explain what you mean ?
    Keep user info from one user away from another user ?
    Hide all the text / some of the text used ?
    Protect Usernames / Passwords ?
    The only safe places would include the user's brain, or an external device - but if that is stolen or lost, sorry.

    If you can be very specific, I'm sure someone here can help you.

    Monday, August 6, 2018 8:46 PM
  • "Now if I want to apply cryptography in a program of mine so as to keep output of my program safe (like strings , user info , ...)"

    Can you explain what you mean ?
    Keep user info from one user away from another user ?
    Hide all the text / some of the text used ?
    Protect Usernames / Passwords ?
    The only safe places would include the user's brain, or an external device - but if that is stolen or lost, sorry.

    If you can be very specific, I'm sure someone here can help you.


    Consider an account management program. What does it do ? users' info shouldn't be stored as plaintext. So this is one example. I need to equip my program with one  encryption/decryption system that encrypts  all the outputs of the program( It could be users' info or any strings ). In simple words ; I don't want to save strings (like txt files) as  plaintext , but encrypted.

    • Edited by Kevin993 Tuesday, August 7, 2018 2:42 PM
    Tuesday, August 7, 2018 2:41 PM
  • Hi

    Among the various sources you may have read, did you see THIS one.


    Regards Les, Livingston, Scotland

    Tuesday, August 7, 2018 3:25 PM
  • "Now if I want to apply cryptography in a program of mine so as to keep output of my program safe (like strings , user info , ...)"

    Can you explain what you mean ?
    Keep user info from one user away from another user ?
    Hide all the text / some of the text used ?
    Protect Usernames / Passwords ?
    The only safe places would include the user's brain, or an external device - but if that is stolen or lost, sorry.

    If you can be very specific, I'm sure someone here can help you.


    Consider an account management program. What does it do ? users' info shouldn't be stored as plaintext. So this is one example. I need to equip my program with one  encryption/decryption system that encrypts  all the outputs of the program( It could be users' info or any strings ). In simple words ; I don't want to save strings (like txt files) as  plaintext , but encrypted.

    Seems like a secure passphrase or device needs to be used and the user must enter it each time they use the software. That passphrase can be used to decrypt  the data. If there are Multiple users and only one Data Source, all users need the same passphrase. 
    Tuesday, August 7, 2018 5:31 PM
  • I agree with Devon.  In this particular case, the user is supplying the secret password (private key).

    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Tuesday, August 7, 2018 7:30 PM
    Moderator