Sponsored Content
Top Forums UNIX for Dummies Questions & Answers File encryption/Key encryption ???? Post 102495 by Perderabo on Saturday 18th of March 2006 03:29:46 PM
Old 03-18-2006
Hmmm..too bad no expert in encryption packages responded to this. I'm not sure what pki is. But this stuff generally flows like this. I would generate a pair of keys. One is my private key. I must keep that secret. The other key is my public key. I can give that out to everyone. It does not matter who knows it. So, for example, I might just publish it...on this website somehow.

Next, let's say you decide to send me a Private Message. Maybe you will just send it in plaintext. Or maybe you will use my public key to encrypt it. How does the recipient(me in this case) know? Well, let's look at two copies of a message, one encrypted and the other in plaintext...
Quote:
$ cat message
Hey Perderabo,

Do you have a typo in that File Permissions tutorial? Isn't it chmod
instead of chdom?


$ cat message2
M2&5Y(%!E<F1E<F%B;RP*"D1O('EO=2!H879E(&$@='EP;R!I;B!T:&%T($9I
M;&4@4&5R;6ES<VEO;G,@='5T;W)I86P_("!)<VXG="!I="!C:&UO9"`*:6YS
1=&5A9"!O9B!C:&1O;3\*"@IT
$
Now in my case I can combine my knowledge of computer science, mathematics, linguistics, and sematics to determine which is the encrypted message. But usually an encryption package will add a header and footer line around the encrypted message. (This includes uuencode, which is what I used to encrypt the above message. I removed the header and the footer.) The only encyption program I can think of that doesn't do this is the original crypt program in unix. And then typically I would feed the encrypted message, including that header and footer into the decryption program. To decrypt the message, I need my private key.

I have not used crypto packages very much. I see some folks putting the public key on their web sites, in signatures, etc. Publicizing your public key is similiar to the problem of publicizing your email address.

With email, by using the mime extentions, you can associate a content type with the email body or with email attachments. So you can send plain text, html, rich text, sometimes even Microsoft Word documents through email. Some encryption packages interact with email the same way. I hope this gets you started. If anyone out there who actually uses this stuff has anything to add, please jump in.
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

How to use PGP File Encryption

Hi All, I am new to the concept of encryption and shell and i have been assigned to do pgp encryption of a file before ftping it. I am developing the script using MKS Toolkit on Windows XP and the script will run later on actual unix box. I am going through documents provided by pgp... (2 Replies)
Discussion started by: sandeepb
2 Replies

2. AIX

file encryption in aix

Hi All, I have a AIX 5.3. does anybody know how to encrypt a text file? Thanks, Vishal (4 Replies)
Discussion started by: vishalpatel03
4 Replies

3. UNIX for Dummies Questions & Answers

VIM: Encryption key.

I'm having one doubt about the VIM ENCRYPTION key. I having a text file, I encrypted that file using :X vim -x filename Now, where the encrypted key is stored (path). Whether it stored in a separate file or the text file itself. If I open a the file it asked Encryption key. How it compare... (1 Reply)
Discussion started by: ungalnanban
1 Replies

4. Solaris

Folder / file encryption

Hi, does anybody know of any tool that would allow me to have all files store in a folder automatically encrypted? or some similar capability? (2 Replies)
Discussion started by: malky
2 Replies

5. UNIX for Dummies Questions & Answers

Remove VI encryption key from file

Hi There, I have set encryption key to my file using :X command. Now that I no more need encryption key to the file, I just want to delete/remove the encryption key. I have gone through many source but in vain. None of the source provided me with the solution that I am looking for. I... (2 Replies)
Discussion started by: grc
2 Replies

6. Red Hat

file encryption

Hello! I want to know about file encryption in redhat linux.... Please suggest me some gud websites from where i can get detailed information... Thanks in advance.... (3 Replies)
Discussion started by: aliyaa
3 Replies

7. Linux

It is possible to find out when a particular encryption key was imported in linux

Hi All, In linux server some encryption keys were imported using gpg command. I want to know when those keys was imported. Is there any way to get when the encryption keys were imported? Thanks in advance.. :rolleyes: (1 Reply)
Discussion started by: latika
1 Replies

8. Cybersecurity

File encryption tools with MAC address as an encryption key

Hi all, I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS. For example: when A wants to send file to B A will encrypt the file with B's computer MAC/IP address as an encryption key This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies

9. UNIX for Advanced & Expert Users

Private and public key encryption

Hi, we have private and public key, encrypt file using public and want to decrypt using private key. can you please advise below commands are correct or other remedy if unix have? encrypt -a arcfour -k publickey.asc -i TESTFILE.csv -o TESTFILE00.csv decrypt -a arcfour -k privatekey.asc... (2 Replies)
Discussion started by: rizwan.shaukat
2 Replies
EVP_SealInit(3) 						      OpenSSL							   EVP_SealInit(3)

NAME
EVP_SealInit, EVP_SealUpdate, EVP_SealFinal - EVP envelope encryption LIBRARY
libcrypto, -lcrypto SYNOPSIS
#include <openssl/evp.h> int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk); int EVP_SealUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, unsigned char *in, int inl); int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); DESCRIPTION
The EVP envelope routines are a high level interface to envelope encryption. They generate a random key and IV (if required) then "envelope" it by using public key encryption. Data can then be encrypted using this key. EVP_SealInit() initializes a cipher context ctx for encryption with cipher type using a random secret key and IV. type is normally supplied by a function such as EVP_des_cbc(). The secret key is encrypted using one or more public keys, this allows the same encrypted data to be decrypted using any of the corresponding private keys. ek is an array of buffers where the public key encrypted secret key will be written, each buffer must contain enough room for the corresponding encrypted key: that is ek[i] must have room for EVP_PKEY_size(pubk[i]) bytes. The actual size of each encrypted secret key is written to the array ekl. pubk is an array of npubk public keys. The iv parameter is a buffer where the generated IV is written to. It must contain enough room for the corresponding cipher's IV, as determined by (for example) EVP_CIPHER_iv_length(type). If the cipher does not require an IV then the iv parameter is ignored and can be NULL. EVP_SealUpdate() and EVP_SealFinal() have exactly the same properties as the EVP_EncryptUpdate() and EVP_EncryptFinal() routines, as documented on the EVP_EncryptInit(3) manual page. RETURN VALUES
EVP_SealInit() returns 0 on error or npubk if successful. EVP_SealUpdate() and EVP_SealFinal() return 1 for success and 0 for failure. NOTES
Because a random secret key is generated the random number generator must be seeded before calling EVP_SealInit(). The public key must be RSA because it is the only OpenSSL public key algorithm that supports key transport. Envelope encryption is the usual method of using public key encryption on large amounts of data, this is because public key encryption is slow but symmetric encryption is fast. So symmetric encryption is used for bulk encryption and the small random symmetric key used is transferred using public key encryption. It is possible to call EVP_SealInit() twice in the same way as EVP_EncryptInit(). The first call should have npubk set to 0 and (after setting any cipher parameters) it should be called again with type set to NULL. SEE ALSO
openssl_evp(3), openssl_rand(3), EVP_EncryptInit(3), EVP_OpenInit(3) HISTORY
EVP_SealFinal() did not return a value before OpenSSL 0.9.7. 1.0.1i 2009-07-20 EVP_SealInit(3)
All times are GMT -4. The time now is 09:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy