This module allows the users to encrypt or decrypt a file.
Encryption is the process of encoding messages or information in such a way that only authorized parties can read it. Encryption does not of itself prevent interception, but denies the message content to the interceptor. In an encryption scheme, the message or information, referred to as plaintext, is encrypted using an encryption algorithm, generating cipher text that can only be read if decrypted. For technical reasons, an encryption scheme usually uses a pseudo-random key generated by an algorithm. It is in principle possible to decrypt the message without possessing the key, but, for a well-designed encryption scheme, large computational resources and skill are required. An authorized recipient can easily decrypt the message with the key provided by the originator to recipients, but not to unauthorized interceptors.
Let us see how to use this module in encrypting and decrypting a file or string.
The help command is a brief user manual that assists the users in handling this module. It specifies the alternative parameters that can be used in declaring. It also specifies the possible functions under this encryption module, along with the syntax for using them. The command used for declaring help option is shown below,
ptconfigure encryption help
The syntax for declaring the help command is not case sensitive which is an added advantage. The following screenshot visualize you about the help command under encryption.
kevell@corp:/# ptconfigure encryption help
******************************
This command allows you to encrypt or decrypt a file.
Encryption, encrypt
- install
Encrypts a file or string
example: sudo ptconfigure encryption install --yes --unencrypted-data=/var/www/a-website/build/config/ptconfigure/SSH/raw/bastion
--encryption-target-file=/tmp/encrypted --encryption-key=/root/.ptconfigure/SSH/key --encryption-file-permissions=""
--encryption-file-owner="" --encryption-file-group=""
- uninstall
Decrypts an encrypted file or string
example: sudo ptconfigure encryption uninstall --yes --encrypted-data=/tmp/encrypted
--encryption-target-file=/var/www/a-website/build/config/ptconfigure/SSH/raw/bastion --encryption-key=/root/.ptconfigure/SSH/key --encryption-file-permissions="" --encryption-file-owner="" --encryption-file-group=""
------------------------------
End Help
******************************
This functions allows the users to encrypt a file or string by simply using the command as given below,
sudo ptconfigure encryption install --yes --unencrypted-data=/var/www/a-website/build/config/ptconfigure/SSH/raw/bastion
--encryption-target-file=/tmp/encrypted --encryption-key=/root/.ptconfigure/SSH/key --encryption-file-permissions=""
--encryption-file-owner="" --encryption-file-group=""
To implement this function, the user have to specify the following fields in the format of above mentioned syntax,
This function allows the users to decrypt an encrypted file or string. This can be achieved by using the command below,
sudo ptconfigure encryption uninstall --yes --encrypted-data=/tmp/encrypted
--encryption-target-file=/var/www/a-website/build/config/ptconfigure/SSH/raw/bastion --encryption-key=/root/.ptconfigure/SSH/key --encryption-file-permissions="" --encryption-file-owner="" --encryption-file-group=""
To implement this function, the user have to specify the following fields in the format of above mentioned syntax,
The alternative parameters for this module, either of which can be used in declaration is,