Better HN
topnewbestaskshowjobs
Log inSign up

book-mind

12 karma · joined Jul 17, 2019 (7y ago) · 3 submissions

Submissions

comment 7y ago · link · parent

That image is still highly misleading, you can see from the overlayed optical image that the CPU is not coated.

Ideally you'd want to coat any metal surface with black epoxy, and set the IR camera Emissivity Coefficient to 0.9 (the coefficient for black epoxy).

comment 7y ago · link · parent

So if I understand you correctly (Noob here), Alice would need to sign the pair (key.enc, file.enc) to authenticate that those files originated from her.

Without that, Bob could potentially receive any pair of (key,file), which would just decrypt into garbage data.

BTW, variations on that sequence appear all over the internet when searching for "openssl encrypt file with public key"...

comment 7y ago · link · parent

Is it wrong to use openssl to encrypt files?

0. (Only once) generate key pair id_rsa.pub.pem, id_rsa.pem

1. Generate random key

  openssl rand -base64 32 > key.bin
2. Encrypt key

  openssl rsautl -encrypt -inkey id_rsa.pub.pem -pubin -in key.bin -out key.bin.enc
3. Encrypt file using key

  openssl enc -aes-256-cbc -salt -in SECRET_FILE -out SECRET_FILE.enc -pass file:./key.bin
-- other side --

4. Decrypt key

  openssl rsautl -decrypt -inkey id_rsa.pem -in key.bin.enc -out key.bin 
5. Decrypt file

  openssl enc -d -aes-256-cbc -in SECRET_FILE.enc -out SECRET_FILE -pass file:./key.bin