Code Monkey home page Code Monkey logo

ghshare's People

Contributors

gaffneyd4 avatar kjvalencik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ckarper

ghshare's Issues

Support OpenSSL decryption compatibility

For small data (e.g., 117 bytes with PKCS#1) it can be convenient to encrypt the data without an envelope so that it can be decrypted with OpenSSL. This can provide an easy flow for fetching public keys without forcing the recipient to download the client.

Refactor prompting to top level

Refactor prompting for passphrases to be at the top level of the application. This will make testing easier and allow for alternate ways to provide values (e.g., config file).

Test passphrase protected keys

This should likely include a refactor to move prompting for accounts to the top level of the program. It is cleaner to handle this at the application level and leave the functionality to simple Option arguments.

Should we handle perfect message sizes?

Currently, an encrypted file will never end with a message that is exactly the chunk size. If it matches exactly, it will create a new empty message that only contains the tag.

This simplifies reading because it does not require any buffering to detect that we are on the last block. However, it may not match other stream implementations. One way to solve this is to keep a buffer that is double in size and modulus between the two halves. However, this significantly increases code complexity.

Check OpenSSL error before attempting passphrase

This code assumes any OpenSSL error reading the private key means that it has a passphrase. It should only check the specific code. This probably requires matching a string or unpacking the OpenSSL code.

if prompt {
let passphrase =
rpassword::prompt_password_stderr("Passphrase: ")?;
Rsa::private_key_from_pem_passphrase(pem, passphrase.as_bytes())

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.