Skip to content

Releases

mystic-crypt 13.12

Choose a tag to compare

@astrapi69 astrapi69 released this 30 Nov 05:15
cb21d96

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.asc and ownertrust.txt are 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 under media in --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.answerFailure is public, so a consumer that builds its own command line around the root command
    answers an unhandled failure with one error: line and exit code 2, as mystic-crypt does (#341). Its parameters
    are picocli's CommandLine and CommandLine.ParseResult, so the module requires info.picocli transitively: 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, notEmpty and Argument.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

Choose a tag to compare

@astrapi69 astrapi69 released this 19 Nov 15:13
3fb28fe

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.decrypt and PassphraseFileFormat.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), and seal refuses 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

Choose a tag to compare

@astrapi69 astrapi69 released this 14 Nov 18:59
ca2c699

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:

  • PassphraseFileFormat names the three formats a file sealed with a passphrase comes in across this family -
    MCFILE (encrypt since #160), MCFILE1 (the file encryption window of mystic-crypt-ui) and MCRYPT (the released
    PassphraseCryptor layout) - and open(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 a SecurityException, as PassphraseEnvelope
    and PassphraseCryptor already 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.encrypt and PassphraseCryptor.encrypt
    throw an IllegalArgumentException for an empty passphrase and a NullPointerException for null, which the key
    derivation used to take as the empty one, and encrypt on 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 AnyKeyFileReader reads the PEM public keys of
    ML-DSA-44, ML-DSA-87 and every SLH-DSA parameter set and whose PrivateKeyReader no 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: its MapFactory takes Map.Entry where it took silly-bean's KeyValuePair, and it no longer
    brings silly-bean, which this library declares itself (4.0, an api dependency); 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, and check runs the javadoc (PR #305); the project page is checked by page-check.yml on every push to
    gh-pages, after the release, instead of in the pull request run, where it still named the previous release
    (PR #303); make runs with the environment's JDK where the pinned one is not installed (PR #311), and
    .sdkmanrc names 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 .sdkmanrc as well (PR #322); tests only: a
    failed GnuPG test leaves what the home held as a CI artifact (PR #310)

FIXED:

  • sign reads 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)
  • convert recognizes and converts an RSA private key in PKCS#1 DER, the form openssl pkey -outform DER writes
    for RSA, which it refused as "not a DER private key" while der2pem read it; sign reads such a key as
    well (#320)
  • decrypt opens what the file encryption window of mystic-crypt-ui wrote, file and text. Before, MCFILE1 begins
    with MCFILE, so every window file was read as one of encrypt's, its iteration count one byte off: the window's
    own file kept decrypt deriving 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

Choose a tag to compare

@astrapi69 astrapi69 released this 11 Nov 17:53
076c2c9

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 a char[] 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 a char[] 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 from SecureRandom below 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.
    SelfSignedCertificateFactory uses it instead of a private copy (#253)

FIXED:

  • hash -a bcrypt and verify refuse 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, so verify accepted 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_BYTES carries the limit, and Argon2id
    takes long passphrases
  • encrypt and decrypt take --passphrase-file (first line of the file; a descriptor such as /dev/fd/3
    works), so piped text no longer needs the deprecated --passphrase that 14.0 removes; keyx send takes
    --message-stdin the 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 on hash and the keystore subcommands (#294)
  • ObfuscatorExtensions.tryToClone answers the empty Optional its Javadoc promises instead of throwing when
    the clone comes back null, so inverse and the deprecated disentangleImproved work for the plain
    HashBiMap the 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 ReleaseKeyJsonTest assumes 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)
  • FileDecryptor and PBEFileDecryptor with decorators rewrite the decrypted file without the decorators, and a
    failed rewrite, for example on a full disk, went unnoticed: file-worker's StoreFileExtensions.toFile writes through
    a PrintWriter, which swallows the IOException. PBEFileDecryptor with deleteEncryptedFileAfterDecryption then
    deleted the encrypted original as well, so both copies were lost. The rewrite now goes through Files.writeString,
    so decrypt throws the IOException before 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
    PBEFileEncryptor do (#281)
  • keystore add-keypair gave the self-signed certificate of a new key pair the millisecond it was made in as serial
    number, through the overload of crypt-data's CertFactory that 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 keeps Build-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 carries KeyValuePair is archived. The
    replacement is the new disentangle(Map<Character, ObfuscationOperationRule<Character, Character>>, String)
    overload, with KeyValuePair.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 an api dependency; 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

Choose a tag to compare

@astrapi69 astrapi69 released this 30 Oct 18:40
fd0e868

SECURITY:

  • salts, GCM nonces, IVs and generated passwords come from java.security.SecureRandom directly,
    through the new SecretRandom, 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, a PBEKeySpec - now goes through the new SecretCopies, which overwrites it when the method
    is done and lets a test read each copy afterwards; in PassphraseEnvelope, PassphraseCryptor,
    SecretBuffers, Ed25519ExpandedPrivateKey and SeedDerivation (#227)

  • HexableEncryptor(key, algorithm) and HexableDecryptor(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, so AesAlgorithm.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 with AEADBadTagException. The algorithm is now in
    the model before the cipher is built; tests check the output against plain JCE in both
    directions. Ciphertext written through HexableEncryptor(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 --password and share 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 -stdin option
    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 -stdin option (#214)

CHANGED:

  • build only: a release resolves no SNAPSHOT, test scope included. noSnapshotDependencies reads
    every resolvable configuration and the build script classpath and fails on a -SNAPSHOT;
    tagRelease depends on it, and check for 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

Choose a tag to compare

@astrapi69 astrapi69 released this 29 Oct 17:39
ebca2be

SECURITY:

  • Update to 13.8. PrivateKeyDecryptor, PrivateKeyGenericDecryptor and GenericObjectDecryptor
    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
    ObjectInputFilter set on its own stream, through the new FilteredDeserialization:

    • the hybrid envelope of PrivateKeyDecryptor admits exactly AesRsaCryptModel and byte[];
    • the generic decryptors admit the types their caller names, String when none are named;
    • every stream is bounded in depth, references, array length and size.

    A caller that decrypts other types than String passes 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.

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.read returns every certificate of
    pubring.kbx, with each key's use, algorithm, creation and expiry. It says whether the secret
    part is in private-keys-v1.d or 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.d holds a revocation certificate that verifies against the primary key.
    GnuPgHome.find takes 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

Choose a tag to compare

@astrapi69 astrapi69 released this 21 Oct 06:16
eeeb32e

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

Choose a tag to compare

@astrapi69 astrapi69 released this 10 Oct 11:13
6e89232

CHANGED:

  • From this version on, releases are signed by a signing subkey instead of the primary key: the
    subkey 6D67 F844 2A6F CC96 BD7C 1B5E 9FCF 7C97 10E2 BD8D (rsa4096, valid until 2028-10-09) of
    the key 5B2F A6B1 1E29 8BC0 9287 F423 D8C4 0351 8C49 CA75. The key with this subkey is on
    keyserver.ubuntu.com and keys.openpgp.org; gpg --verify on an artifact's .asc names 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 secret GPG_KEY_ID; without it the build signs with a full key, as before (#190)

mystic-crypt 13.5

Choose a tag to compare

@astrapi69 astrapi69 released this 07 Oct 09:21
f257b34

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

Choose a tag to compare

@astrapi69 astrapi69 released this 04 Oct 15:48
a81f52b

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.