Sign inSign up

beubi/webencryptor

By beubi

•Updated over 7 years ago

This application preforms string encryption using either PGP or RSA algorithm.

Image
0

897

beubi/webencryptor repository overview

⁠Encription webapp

This application preforms string encryption using one of the following algorithms

  • PGP (using a public of any standard size and AES256 symmetric cipher)
  • RSA (using a PEM public key and OAEP padding)

⁠Setting up application public keys

The application will be expecting the public keys in the RSA_PUBLIC_KEY and PGP_PUBLIC_KEY environment variables as a base64 encoded string or plain text value, works both ways.

To encode a public key as a base64 string you can run the following command:

openssl base64 -A -in <key_file>

Grab the output and inject it as an environment variable in your container.

⁠Application's working algorithm

In order to work the you need to tell the application what is the algorithm the will be used, thi is configure in ALGORITHM environment variable, possible values are 1 for PGP and 2 for RSA.

By default this value is 1 (PGP).

⁠Application's base url path

It is possible to configure the application's url path by setting the PATH_BASE environment variable, providing a value to this variable will make the all the application requests, including assets, be served through http://[your-domain]/<PATH_BASE>. This may be useful for serving multiple applications under the same domain (Ex: k8s ingress). By default this value is /encryptor

⁠Encryption result enclosuring tag

It is possible to format the encryption result with prepend and and append tags, for that you need to set the PREPEND_TAG and/or APPEND_TAG environment variables.

As an example, by setting these variables to PREPEND_TAG="[start]" and APPEND_TAG="[END]" the encryption result would look like:

[START]LS0tLS1CRUdJTiBQVU...JMSUMgS0VZLS0tLS0KTU[END]

By default these variables are empty, meaning that no enclosuring tag is applied to the result.

⁠Running

docker run -it -p 5000:5000 -e RSA_PUBLIC_KEY=[base64String] beubi/rsa-encryptor

⁠About

Webencryptor is written in c# using .NET Core 2.2 framework.

Webencryptor is open source software released under the MIT License. The latest version can be found at https://bitbucket.org/beubi/webencryptor⁠

Tag summary

Content type

Image

Digest

Size

102.2 MB

Last updated

over 7 years ago

docker pull beubi/webencryptor