From be724a473909f415f239dffde054ad37a48113e0 Mon Sep 17 00:00:00 2001 From: Abhishek Arora Date: Fri, 4 Apr 2025 21:26:17 +0530 Subject: [PATCH 1/2] Update rsa-gen.html Changed in Openssl ver3 --- templates/rsa-gen.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rsa-gen.html b/templates/rsa-gen.html index 86fe5b0..bd32ee1 100644 --- a/templates/rsa-gen.html +++ b/templates/rsa-gen.html @@ -85,13 +85,13 @@

Derive Public Key

Encrypt Data

We can now use this key pair to encrypt and decrypt a file, data.txt.

-
$ openssl rsautl -encrypt -inkey public.pem -pubin -in data.txt -out data.txt.enc
+
$ openssl pkeyautl -encrypt -inkey public.pem -pubin -in data.txt -out data.txt.enc

Decrypt Data

Given the encrypted file from the previous step, you may decrypt it like so.

-
$ openssl rsautl -decrypt -inkey private.pem -in data.txt.enc -out data.txt
+
$ openssl pkeyautl -decrypt -inkey private.pem -in data.txt.enc -out data.txt
From 89a04ab930de0510b736414bdaf2b38c10d9c7ca Mon Sep 17 00:00:00 2001 From: Abhishek Arora Date: Fri, 4 Apr 2025 21:29:14 +0530 Subject: [PATCH 2/2] rsautl to pkeyutl in openssl v3 rsautl to pkeyutl in openssl v3 --- templates/rsa-gen.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/rsa-gen.html b/templates/rsa-gen.html index bd32ee1..65b6f40 100644 --- a/templates/rsa-gen.html +++ b/templates/rsa-gen.html @@ -85,13 +85,13 @@

Derive Public Key

Encrypt Data

We can now use this key pair to encrypt and decrypt a file, data.txt.

-
$ openssl pkeyautl -encrypt -inkey public.pem -pubin -in data.txt -out data.txt.enc
+
$ openssl pkeyutl -encrypt -inkey public.pem -pubin -in data.txt -out data.txt.enc

Decrypt Data

Given the encrypted file from the previous step, you may decrypt it like so.

-
$ openssl pkeyautl -decrypt -inkey private.pem -in data.txt.enc -out data.txt
+
$ openssl pkeyutl -decrypt -inkey private.pem -in data.txt.enc -out data.txt