Skip to content

Commit 7421d32

Browse files
committed
update to version 1.1
1 parent 639ad4a commit 7421d32

File tree

8 files changed

+630
-414
lines changed

8 files changed

+630
-414
lines changed

claes

Lines changed: 411 additions & 298 deletions
Large diffs are not rendered by default.

claes.sig

0 Bytes
Binary file not shown.

clsmime

Lines changed: 171 additions & 100 deletions
Large diffs are not rendered by default.

clsmime.sig

0 Bytes
Binary file not shown.

man/claes.1

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH CLAES "1" "June 2025" "Cryptlib Tools" "Cryptlib Tools" CLAES "1"
1+
.TH CLAES "1" "August 2025" "Cryptlib Tools" "Cryptlib Tools" CLAES "1"
22
.SH NAME
33
\fBclaes\fR \- conventional encryption tool interoperating with gpg and openssl
44
.SH SYNOPSIS
@@ -7,10 +7,10 @@
77
.SH DESCRIPTION
88
\fBclaes\fR encrypts or decrypts data in OpenPGP format, CMS format and OPENSSL format using files or standard input with a passphrase-based AES cipher.
99
If no FILE or "-" is given, data is read from standard input.
10-
The size of any input data is limited to 150 MByte. The default mode of operation is \fBencryption\fR with the ciphertext stored base64-encoded in the OpenPGP format. To decrypt base64-encoded or binary input data the option "-decrypt" must be used.
10+
The size of any internal input data is limited to 256 MByte. The default mode of operation is \fBencryption\fR with the ciphertext stored base64-encoded in the OpenPGP format. To decrypt base64-encoded or binary input data the option \fB-decrypt\fR must be used.
1111

12-
All input data is processed AS IS and is treated internally as binary data with no changes. For every encryption or decryption a user-provided passphrase is read from the terminal in which claes is run. So claes always works interactively.
13-
There is deliberately no public-key-cryptography build into claes. If you need those, please use clsmime and clkeys.
12+
All input data is processed AS IS and is treated internally as binary data with no changes. For every encryption or decryption a user-provided passphrase is read from the terminal in which claes is run. So \fBclaes\fR always works interactively.
13+
There is deliberately no public-key-cryptography build into claes. If you need those, please use \fBclsmime\fR and \fBclkeys\fR.
1414

1515
.SH OPTIONS
1616
.PP
@@ -28,14 +28,23 @@ print debugging information to stderr
2828
produce CMS enveloped and encrypted data instead of OpenPGP (default)
2929
.TP
3030
\fB\-openssl\fR
31-
produce encrypted data using pbkdf2 in openssl format
31+
produce encrypted data in openssl format using pbkdf2 for passphrase mangling
3232
.TP
3333
\fB\-128\fR
34-
forces the use of 128 bit AES keys in conjunction with -openssl\br
35-
(256 bits is the default)
34+
forces the use of 128 bit AES keys in conjunction with -openssl
35+
.br
36+
(AES 256 bits is the default)
3637
.TP
3738
\fB\-decrypt\fR
3839
decrypts an encrypted message (default is encrypt)
40+
.br
41+
If data is compressed it will be de-compressed automatically
42+
.TP
43+
\fB\-binary\fR
44+
uses binary data both for input and output
45+
.TP
46+
\fB\-compress\fR
47+
forces compression before data is encrypted
3948
.PP
4049

4150
.SH NOTES
@@ -62,20 +71,25 @@ data from stdin. This program is part of the systemd package.
6271

6372
Without any options claes produces OpenPGP (base64-encoded) encrypted messages using AES-128.
6473
It can decrypt any messages (ascii or binary) produced by GnuPG with the following ciphers:
65-
AES, AES192, AES256, 3DES and CAST-128.
74+
AES, AES192, AES256, 3DES and CAST-128. The option "-binary" causes the output written to a
75+
file with the .gpg extension. As binary output does not compute the CRC24 checksum, it is much
76+
faster than the default mode and is recommended for the encryption of larger files.
6677

67-
To mangle the password correctly the option --s2k-digest-algo SHA256 must be used with gpg.
78+
To mangle the password correctly the option \fB--s2k-digest-algo SHA256\fR must be used with gpg.
6879

80+
From version 1.1 an MDC packet is added to every encryption in OpenPGP mode. Integrity protection
81+
is also used with the CMS format.
6982
.TP
7083
\fBopenssl\fR
7184

72-
In OpenSSL mode claes writes (base64-encoded) encrypted messages in the proprietary OpenSSL format using AES256 as the default.
85+
In OpenSSL mode claes writes encrypted messages in the proprietary OpenSSL format using AES256 as the default.
7386

7487
These messages can be decrypted with openssl :\br
7588
\fB openssl aes-256-cbc -pbkdf2 -d -a -in FILE.asc \fR
7689

7790
The use of AES-128 can be forced by the additional option -128 both for encryption or decryption of OpenSSL messages.
7891

92+
There is no compression available in OpenSSL mode.
7993
.TP
8094
\fBCMS\fR
8195

man/clsmime.1

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
.B clsmime [OPTIONS] verify signed_message [CArootCertificate]
1212

13+
.B clsmime [OPTIONS] list [<NumLines>] MessageFile
14+
1315
.br
1416
.SH DESCRIPTION
1517
\fBclsmime\fR encrypts text or binary data with a RSA \fBpublic key\fR stored in a recipients's certificate file.
@@ -41,6 +43,13 @@ generate a detached signature in S/MIME format as multipart/signed
4143
.br
4244
(default is a signature including the enclosed text message)
4345
.TP
46+
\fB-integritycheck\fR
47+
forces integrity protection while encrypting data.
48+
.br
49+
The cryptogram is enveloped in a authEnvelopedData object that cannot be decrypted with OpenSSL.
50+
.br
51+
Use this option when the output data is processed with \fBclsmime\fR.
52+
.TP
4453
\fB\-binary\fR
4554
do not change the input bytes (default is \fBtext mode\fR)
4655

@@ -63,25 +72,31 @@ write the certificate chain to the file system during verification of a S/MIME s
6372

6473

6574
\fBMicrosoft Outlook:\fR Use the contacts tab to enter the Common Name and the email address and finally
66-
click on the \\'certificate button\\' to import the contact's certificate stored in a *.cer file.
75+
click on the 'certificate button' to import the contact's certificate stored in a *.cer file.
6776

6877
.TP
6978
\fBOpenSSL\fR
7079

7180
The following OpenSSL commands can be used to exchange message files with \fBclsmime\fR :\br
7281

73-
\fB Encryption :\fR openssl smime -encrypt -aes-256-cbc -in message -binary -out message.smime certfile
82+
.in +4n
83+
\fB Encryption :\fR
84+
openssl smime -encrypt -aes-256-cbc -in message -binary -out message.smime certfile
7485

75-
\fB Decryption :\fR openssl smime -decrypt -in message -out message.clear -recip cert -inkey RSAkey
86+
\fB Decryption :\fR
87+
openssl smime -decrypt -in message -out message.clear -recip cert -inkey RSAkey
7688

77-
\fB Signing :\fR openssl smime -sign -in message -text -signer cert -inkey RSAkey -out message.sig
89+
\fB Signing :\fR
90+
openssl smime -sign -in message -text -signer cert -inkey RSAkey -out message.sig
7891

79-
\fB Verification :\fR openssl smime -verify -in message -out message.verified -inkey certfile -CAfile CAcert
92+
\fB Verification :\fR
93+
openssl smime -verify -in message -out message.verified -inkey certfile -CAfile CAcert
94+
95+
.PP
8096

8197
\fBCertChains\fR can be examined with:
8298
.br
8399
sed -i \'s/CERTIFICATE CHAIN/PKCS7/\' certchain ; openssl pkcs7 -in certchain -text -print_certs
84-
.PP
85100

86101
.SH NOTES
87102
Full documentation <https://senderek.ie/cryptlib/tools>
@@ -104,6 +119,9 @@ data from stdin. This program is part of the systemd package.
104119
/usr/bin/systemd-ask-password
105120
This program is used to provide the passphrase based on a user's input.
106121
.TP
122+
/usr/bin/dumpasn1
123+
This program is used to list the ASN1 structure of output files.
124+
.TP
107125
/lib64/libcl.so.3.4.8
108126
The cryptlib library.
109127
.TP

pdf/claes-manual.pdf

938 Bytes
Binary file not shown.

pdf/clsmime-manual.pdf

397 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)