Repository navigation
Releases
mystic-crypt 13.12
A minor release: release-key status reads the offline media of a key, MysticCryptCli.answerFailure becomes
public API, and the runtime dependencies move to jobj-core 10.0, crypt-data 13.3.2 and Bouncy Castle 1.87, the last
with the security fixes its release notes name.
ADDED:
release-key status --medium DIR, given more than once for several media, reads the folder of an offline medium:
which of<keyid>-secret.asc,<keyid>-public.asc,<keyid>-revoke.ascandownertrust.txtare there, whether
the secret copy holds the primary key's secret part or only a stub, whether the revocation certificate verifies
against the primary key, and when the key expires; readable and undermediain--json. It reads only, with
Bouncy Castle's readers and never with a passphrase; a medium that cannot be read exits with 2. In the API:
gnupg.OfflineMedium.read(folder)(PR #344, astrapi69/mystic-crypt-ui#642)MysticCryptCli.answerFailureis public, so a consumer that builds its own command line around the root command
answers an unhandled failure with oneerror:line and exit code 2, asmystic-cryptdoes (#341). Its parameters
are picocli'sCommandLineandCommandLine.ParseResult, so the module requiresinfo.picoclitransitively: a
consumer module reads picocli through this one
CHANGED:
- the runtime dependency Bouncy Castle (bcprov, bcpkix, bcpg) is 1.87 instead of 1.86 (#347), with the fixes of
CVE-2026-103605 (the PBES1 and PKCS#12 PBE iteration count honoured unbounded) and CVE-2026-103607 (an OpenPGP key
merge that discarded a genuine revocation) among the twelve its release notes name. Note: its PKCS12 keystore
writes with 300,000 PBE iterations (600,000 for the MAC) by default instead of 600,000 - the runtime dependency crypt-data is 13.3.2 instead of 13.3.1 (#346): its reader of password protected key files in
DER form checks the iteration count a file names against one bound before it derives a key - the runtime dependency jobj-core is 10.0 instead of 9.1 (#332). jobj-core 10.0 needs Java 25, as this library does,
removes twelve types and changes the answers of seven methods (its CHANGELOG, BREAKING CHANGES); mystic-crypt calls
Check.get().notNull,notEmptyandArgument.notEmpty, whose signatures are the same, and links against none of
the removed types or changed methods. Note: a project that gets jobj-core through mystic-crypt and uses one of
those types or methods itself reads the BREAKING CHANGES of jobj-core 10.0
Built with Temurin 25.0.5+2, the JDK .sdkmanrc names, in the publish run of the tag.
Artifacts are on Maven Central as io.github.astrapi69:mystic-crypt:13.12, signed with the release signing subkey;
all six - the jar, the -all jar, the sources and javadoc jars, the pom and the module metadata - match their sha1
files and carry a valid signature of that subkey.
mystic-crypt 13.11.1
A patch release of 13.11 with one change: the readers of the passphrase-sealed formats check the iteration count a
header records against one bound before they derive a key. Nothing else changes from 13.11.
FIXED:
- the readers of the passphrase-sealed formats check the iteration count a header records against one bound,
PassphraseEnvelope.MAXIMUM_ITERATIONS(2 000 000), before they derive a key:PassphraseEnvelope.decrypt,
PassphraseCryptor.decryptandPassphraseFileFormat.open. A count of 0, a negative count or one above it is
refused as not this format (IllegalArgumentException, exit 2 on the command line), andsealrefuses to write
one. Every file a released writer produced records 600 000 and keeps opening. A writer above the bound needs a new
format version.
Built with Temurin 25.0.5+8.
Artifacts are on Maven Central as io.github.astrapi69:mystic-crypt:13.11.1, signed with the release signing subkey;
all six - the jar, the -all jar, the sources and javadoc jars, the pom and the module metadata - are byte-identical to
a local build of the tagged commit.
Security: this release fixes GHSA-m42j-97pf-6mc7.
mystic-crypt 13.11
The release with one reader for the three formats a file sealed with a passphrase comes in, so that decrypt opens
what the file encryption window of mystic-crypt-ui writes, whose encrypt refuses a passphrase that protects
nothing, and whose javadoc jar builds the same bytes on every machine; crypt-data 13.3.1 and silly-collection 30.0
come along.
ADDED:
PassphraseFileFormatnames the three formats a file sealed with a passphrase comes in across this family -
MCFILE(encryptsince #160),MCFILE1(the file encryption window of mystic-crypt-ui) andMCRYPT(the released
PassphraseCryptorlayout) - andopen(byte[], char[])opens any of them, telling them apart by the header, and
leaves the caller's passphrase array as it was. Content in none of them, or cut short, is an
IllegalArgumentException; a wrong passphrase or altered data is aSecurityException, asPassphraseEnvelope
andPassphraseCryptoralready throw it. It writes nothing; which format both sides write is a decision of its
own (#306, astrapi69/mystic-crypt-ui#877)
CHANGED:
- encrypting refuses a passphrase that protects nothing:
PassphraseEnvelope.encryptandPassphraseCryptor.encrypt
throw anIllegalArgumentExceptionfor an empty passphrase and aNullPointerExceptionfor null, which the key
derivation used to take as the empty one, andencrypton the command line answers an empty line on standard
input, or Enter alone at the prompt, with exit code 2 instead of sealing a file that opens for anybody. A caller
that passed an empty or null passphrase now gets the exception; opening with the empty passphrase still works,
so what an earlier release sealed under it opens, and only null is refused there (#314) - what consumers inherit from this release: crypt-data 13.3.1, whose
AnyKeyFileReaderreads the PEM public keys of
ML-DSA-44, ML-DSA-87 and every SLH-DSA parameter set and whosePrivateKeyReaderno longer writes a stack trace for
every algorithm it tries (crypt-data#141, crypt-data#144, PR #313); and silly-collection 30.0 instead of 29.1, a
major of the family: itsMapFactorytakesMap.Entrywhere it took silly-bean'sKeyValuePair, and it no longer
brings silly-bean, which this library declares itself (4.0, anapidependency); this library calls none of the
changed methods (PR #317). Build and test only: the versions plugin 0.67.0, silly-io 5.0 and silly-strings 10 for
the tests (PR #308). The next versions of Bouncy Castle, PIT, Spotless, Guava, commons-lang3, jackson-databind and
japicmp reached Maven Central or the Plugin Portal, and Gradle 9.9.1 its distribution server, less than fourteen
days before this cut and follow with the next cycle; file-worker 21.0 is a runtime major and gets a session of its
own - build only: the javadoc jar builds the same bytes whatever the machine's language, so the published one can be
verified byte for byte against a local build like the other four artifacts (PR #304); a javadoc warning fails the
build, andcheckruns the javadoc (PR #305); the project page is checked bypage-check.ymlon every push to
gh-pages, after the release, instead of in the pull request run, where it still named the previous release
(PR #303);makeruns with the environment's JDK where the pinned one is not installed (PR #311), and
.sdkmanrcnames that JDK (PR #316), which moves from the 25 GA build to Temurin 25.0.5, the JDK CI already built
13.10 with (PR #318), and which every CI workflow now reads from.sdkmanrcas well (PR #322); tests only: a
failed GnuPG test leaves what the home held as a CI artifact (PR #310)
FIXED:
signreads a DER private key of every family, as its description promises: an Ed25519, ML-DSA or SLH-DSA
key in DER was read as PEM and ended in a NullPointerException and exit code 2, measured on the six parameter
sets the command test covers (Ed25519, ML-DSA-44, -65 and -87, SLH-DSA-SHA2-128F and SLH-DSA-SHAKE-128F); RSA,
ECDSA and DSA keys in DER were read already, and a PEM key is read as before (#319)convertrecognizes and converts an RSA private key in PKCS#1 DER, the formopenssl pkey -outform DERwrites
for RSA, which it refused as "not a DER private key" whileder2pemread it;signreads such a key as
well (#320)decryptopens what the file encryption window of mystic-crypt-ui wrote, file and text. Before,MCFILE1begins
withMCFILE, so every window file was read as one ofencrypt's, its iteration count one byte off: the window's
own file keptdecryptderiving a key for 269.6 seconds and then answered "the passphrase is wrong", exit 1; a
window text ended in "invalid iterationCount value", exit 2. Where a header fits both markers, a reading whose
recorded iteration count is beyond ten times today's is no longer tried (#306)
Built with OpenJDK Runtime Environment Temurin-25.0.5+8 (build 25.0.5+8-LTS).
Artifacts are on Maven Central as io.github.astrapi69:mystic-crypt:13.11, signed with the
release signing subkey; all six - the jar, the -all jar, the sources and javadoc jars, the pom and
the module metadata - are byte-identical to a local double build of the tagged commit in a
differing language, time zone and directory.
mystic-crypt 13.10
The release whose bcrypt refuses what the algorithm cannot read, whose command line pipes text
without the deprecated passphrase option and answers every unhandled failure alike, and whose
artifacts build byte for byte reproducibly; crypt-data 13.3 and silly-bean 4.0 come along.
ADDED:
SecretRandom.characters(int length, CharSequence alphabet)draws achar[]from an alphabet the caller chooses,
for a generated password: every distinct character with the same probability (SecureRandom.nextInt, no modulo
bias), a character repeated in the alphabet counts once, and the result is achar[]the caller can overwrite. A
null or empty alphabet, a negative length and an alphabet with a surrogate are refused with a message that names
the argument (#252)SecretRandom.certificateSerialNumber()draws a serial number for a new X.509 certificate as RFC 5280 section
4.1.2.2 asks for it: 158 bits fromSecureRandombelow a set 159th bit, so it is positive, never 0, and its DER
encoding takes the 20 octets RFC 5280 allows, far above the 64 random bits of the CA/Browser Forum baseline.
SelfSignedCertificateFactoryuses it instead of a private copy (#253)
FIXED:
hash -a bcryptandverifyrefuse a password of more than 72 UTF-8 bytes with a message that names the
lengths, instead of silently hashing only the first 72 - bcrypt reads no more, soverifyaccepted every
password that shared those 72 bytes (#293). CONSEQUENCE: a hash made earlier from a longer password can no
longer be verified with the full password;BcryptHasher.MAX_PASSWORD_BYTEScarries the limit, and Argon2id
takes long passphrasesencryptanddecrypttake--passphrase-file(first line of the file; a descriptor such as/dev/fd/3
works), so piped text no longer needs the deprecated--passphrasethat 14.0 removes;keyx sendtakes
--message-stdinthe same way, and the both-stdin refusal names the supported way out (#291)- every failure a command does not handle itself answers one
error:line and exit 2 instead of a Java stack
trace and exit 1, which is the code of a domain answer (verify-signature: 0 valid, 1 invalid, 2 error) -
measured onhashand thekeystoresubcommands (#294) ObfuscatorExtensions.tryToCloneanswers the emptyOptionalits Javadoc promises instead of throwing when
the clone comes back null, soinverseand the deprecateddisentangleImprovedwork for the plain
HashBiMapthe obfuscation plugin builds (#292); a CHAIN of rules still cannot be inverted and now fails
honestly (#295, scheduled for 14.0)- the umlaut case of
ReleaseKeyJsonTestassumes a machine whose file names can hold it, so a POSIX-locale
build is green and reports the case as skipped with the reason (#288, test only) FileDecryptorandPBEFileDecryptorwith decorators rewrite the decrypted file without the decorators, and a
failed rewrite, for example on a full disk, went unnoticed: file-worker'sStoreFileExtensions.toFilewrites through
aPrintWriter, which swallows theIOException.PBEFileDecryptorwithdeleteEncryptedFileAfterDecryptionthen
deleted the encrypted original as well, so both copies were lost. The rewrite now goes throughFiles.writeString,
sodecryptthrows theIOExceptionbefore anything is deleted, and the encrypted original stays as it was (#272)PBEFileDecryptor(model, decryptedFile, decryptedFileExtension)ignored the extension: without a decrypted file the
result was named with.decrypted. It now takes the given extension, as the four-argument constructor and
PBEFileEncryptordo (#281)keystore add-keypairgave the self-signed certificate of a new key pair the millisecond it was made in as serial
number, through the overload of crypt-data'sCertFactorythat takes a number of days (crypt-data#118): predictable,
and shared by two certificates made in one millisecond. It now draws the serial number with
SecretRandom.certificateSerialNumber()(#253)- Two builds of the same commit produce the same bytes: the jar manifest loses its build timestamp, operating system
and exact JDK patch version and keepsBuild-Jdk-Spec, and every archive, the runnable all-jar included, writes
fixed entry times in a fixed order, so a published artifact verifies against a local build by hash (PR #286)
DEPRECATED:
ObfuscatorExtensions.disentangle(List<KeyValuePair<Character, ObfuscationOperationRule<Character, Character>>>, String)
is deprecated since 13.10 and goes in 14.0: the silly-bean library that carriesKeyValuePairis archived. The
replacement is the newdisentangle(Map<Character, ObfuscationOperationRule<Character, Character>>, String)
overload, withKeyValuePair.toMap(rules)where a list of pairs is at hand (#278)
CHANGED:
- what consumers inherit from this release: silly-bean 4.0 (the archived library's final release, API-identical to
3.0) as anapidependency; crypt-data 13.3; and no jaxb pre-release build on the runtime class path any more
(PR #287, crypt-data#133, #284). Bouncy Castle stays at 1.86, PIT at 1.30.1 and Spotless at 8.10.4: their next
versions reached Maven Central and the Plugin Portal 0, 6 and 9 days before this cut, and a dependency version
enters a release only after fourteen days in the open; they follow with the next cycle, Bouncy Castle with its
jar signatures checked against the key that signed 1.86
Built with OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS).
Artifacts are on Maven Central as io.github.astrapi69:mystic-crypt:13.10, signed with the
release signing subkey; the jar, sources jar, pom and module metadata are byte-identical to a
local double build of the tagged commit.
mystic-crypt 13.9
SECURITY:
- salts, GCM nonces, IVs and generated passwords come from
java.security.SecureRandomdirectly,
through the newSecretRandom, and no longer through randomizer, a library for test data whose
default generator was seeded with the current time before its 10.5 (GHSA-rmpr-hqmh-r8gp). The
library no longer depends on randomizer at runtime; a test fails if any class of it refers to
randomizer again (#241)
FIXED:
-
PassphraseEnvelope.deriveKey(char[], ...)left the derived key bytes in memory. Every working copy
of secret material - the characters of a passphrase, derived key bytes, the buffers of a charset
coder, aPBEKeySpec- now goes through the newSecretCopies, which overwrites it when the method
is done and lets a test read each copy afterwards; inPassphraseEnvelope,PassphraseCryptor,
SecretBuffers,Ed25519ExpandedPrivateKeyandSeedDerivation(#227) -
HexableEncryptor(key, algorithm)andHexableDecryptor(key, algorithm)ignored the algorithm
they were given. It was set on the model after the cipher had been built for the AES/GCM
default, soAesAlgorithm.AES- the way back to the pre-10.0 transformation the 10.0 notes
name - encrypted with GCM and wrote no nonce: neither ECB nor GCM could read the result, and
data written by 7.x with plain "AES" failed withAEADBadTagException. The algorithm is now in
the model before the cipher is built; tests check the output against plain JCE in both
directions. Ciphertext written throughHexableEncryptor(key, AesAlgorithm.AES)from 10.0 to
13.8 cannot be recovered by any version: its nonce was never stored (#210)
DEPRECATED:
- A secret given as an argument:
hash --password,verify --password,checksum --key,
encrypt --passphrase,decrypt --passphrase,keystore --passwordandshare split --secret.
An argument is visible to every process on the machine and lands in shell history. They still
work in 13.x and print a warning on standard error; 14.0 removes them. Use the-stdinoption
beside each, or leave both out: in a terminal the command now asks without echoing what is
typed, and without one it refuses and names the-stdinoption (#214)
CHANGED:
- build only: a release resolves no SNAPSHOT, test scope included.
noSnapshotDependenciesreads
every resolvable configuration and the build script classpath and fails on a-SNAPSHOT;
tagReleasedepends on it, andcheckfor a release version (#245) - guava 33.7.2-jre, from 33.7.1-jre. random-beans is gone from the tests, and with it the
jackson 2.9.8 it put on the test class path; it was used by no test (#213) - dependencies raised by
versionCatalogUpdate, stable versions only: crypt-data 13.2, commons-codec
1.23.0, commons-lang3 3.21.0, and for the tests randomizer 10.7 and json-extensions 4.0; the build
plugins spotless 8.10.4, versions 0.66.0, version-catalog-update 1.1.2, japicmp 0.26.5, jacoco
0.8.16, pitest 1.30.1. The catalog update keeps to stable versions: without a selector it had
offered guava 999.0.0-HEAD-jre-SNAPSHOT (#247)
Built and signed by publish.yml on the tag (run 41105345630, Temurin JDK 25.0.5+8), released in the Central Portal: https://central.sonatype.com/artifact/io.github.astrapi69/mystic-crypt/13.9
mystic-crypt 13.8
SECURITY:
-
Update to 13.8.
PrivateKeyDecryptor,PrivateKeyGenericDecryptorandGenericObjectDecryptor
turned the bytes they were given back into objects with Java serialization, without a filter.
Up to 13.7, whoever supplied those bytes chose which classes on the caller's class path were
built while they were read (GHSA-87j9-xjf5-f387). Each of them now reads through an
ObjectInputFilterset on its own stream, through the newFilteredDeserialization:- the hybrid envelope of
PrivateKeyDecryptoradmits exactlyAesRsaCryptModelandbyte[]; - the generic decryptors admit the types their caller names,
Stringwhen none are named; - every stream is bounded in depth, references, array length and size.
A caller that decrypts other types than
Stringpasses them to the new constructors,
PrivateKeyGenericDecryptor(PrivateKey, Collection<Class<?>>)and
GenericObjectDecryptor(CryptModel, Collection<Class<?>>). Envelopes written by every release
mystic-crypt-ui shipped, 8 to 13.7, still open; a test lets each of those releases write one.
Replacing Java serialization with a format that cannot build classes at all is a later step. - the hybrid envelope of
ADDED:
io.github.astrapi69.mystic.crypt.gnupg: reads a GnuPG 2.1+ home with Bouncy Castle's OpenPGP
module, never through gpg and never writing to it.GnuPgHome.readreturns every certificate of
pubring.kbx, with each key's use, algorithm, creation and expiry. It says whether the secret
part is inprivate-keys-v1.dor offline, found by the public part each key file carries in the
clear, since Bouncy Castle's keygrip differs from gpg's for RSA. It also says whether
openpgp-revocs.dholds a revocation certificate that verifies against the primary key.
GnuPgHome.findtakes a fingerprint or a long key id, written either way (#211)- the command
release-key status [--home DIR] [--key FINGERPRINT] [--json], the same facts for a
shell and, with--json, for a script. Exit codes: 0 read, 1 the named key is not in the home,
2 the home cannot be read (#211)
CHANGED:
- Bouncy Castle 1.86 for bcprov (from 1.85.2) and bcpkix (from 1.85), and bcpg 1.86 as a new
dependency, in the version the OpenPGP reader needs next to bcprov (#211) - jackson-databind is declared directly for the JSON of
release-key status. It was already on the
runtime class path in the same version, 2.22.4, through randomizer and jobj-copy (#211)
mystic-crypt 13.7
CHANGED:
- randomizer 10.6 and file-worker 19.1: what they bring now resolves jackson-databind 2.22.4
instead of the release candidate 2.16.0-rc1 (through jobj-copy 4.3) and commons-beanutils
1.11.0 instead of 1.9.4 (through jobj-compare 12), both flagged by Dependabot in consumers (#204)
mystic-crypt 13.6
CHANGED:
- From this version on, releases are signed by a signing subkey instead of the primary key: the
subkey6D67 F844 2A6F CC96 BD7C 1B5E 9FCF 7C97 10E2 BD8D(rsa4096, valid until 2028-10-09) of
the key5B2F A6B1 1E29 8BC0 9287 F423 D8C4 0351 8C49 CA75. The key with this subkey is on
keyserver.ubuntu.com and keys.openpgp.org;gpg --verifyon an artifact's.ascnames the
subkey as the signer and the key above as its primary. 13.5 and earlier were signed by the
primary key itself. The publish workflow passes the subkey's id to Gradle's in-memory signing as
the secretGPG_KEY_ID; without it the build signs with a full key, as before (#190)
mystic-crypt 13.5
CHANGED:
- PassphraseEnvelope declares GeneralSecurityException instead of Exception on encrypt, decrypt and
deriveKey. Everything a caller acts on was a runtime exception already - IllegalArgumentException
for "not this format", SecurityException for "would not open" - so the declared type now says
what is left: the security machinery failing underneath. A caller that catches or declares
Exception compiles unchanged; one that catches an unrelated checked type around the call would
not, and no caller in the family does. japicmp counts the narrowing as source-incompatible, so
apiCompatibility leaves these six methods out against baseline 13.4 only, declared in
gradle/api-compatibility.gradle (#182)
On Maven Central: io.github.astrapi69:mystic-crypt:13.5.
mystic-crypt 13.4
ADDED:
- pw.PassphraseEnvelope: seals bytes with a passphrase under a marker the caller chooses -
magic | salt (16) | iterations (4, big endian) | key-committing AES-GCM, with the header as
associated data and PBKDF2-HMAC-SHA256 at 600,000 iterations for new output. Byte for byte the
layout mystic-crypt-ui has written its vault and its file-crypt output with since 8.6; a file
that application wrote is the acceptance vector in the test. It carries no version byte of its
own - the caller's magic is the format identifier - and refuses PassphraseCryptor's MCRYPT
marker by name, because files in that layout carry a version byte where this one carries the
salt. "Not ours" is an IllegalArgumentException, "ours, and it would not open" a
SecurityException, the same split PassphraseCryptor makes. The caller owns the passphrase
array: it is read and never modified, and the caller overwrites it with SecretBuffers.wipe once
the call returns (#160)
CHANGED:
- encrypt / decrypt: encrypt writes the general envelope under the marker MCFILE. decrypt reads
MCFILE and the MCRYPT layout that 13.2 and 13.3 wrote, and opening an MCRYPT file never rewrites
it - a migration is an action of the user, not a side effect of reading. The exit codes keep
their meaning: 1 for a wrong passphrase or altered data, 2 for input in neither layout. The
commands overwrite the passphrase after every call themselves, since the envelope does not
(#160) - PassphraseCryptor is unchanged, as the reader and writer of the layout on disk since 13.2; its
javadoc points to PassphraseEnvelope for new formats (#160)
MIGRATION:
- A file written by 13.4's encrypt starts with MCFILE and does not open with the decrypt of 13.3 or
older. Files written by 13.2 and 13.3 keep opening, unchanged, with 13.4.
On Maven Central: io.github.astrapi69:mystic-crypt:13.4.