Skip to content

IsEncrypted flag set for UTOC container for not reason #53

Closed

Description

@Kein

The resulting UTOC and UCAS arent encrypted but the tool set isEncrypted flag regardless in UTOC header:

image

Activity

  1. added
    bug
    on Dec 20, 2024
  2. Ghostyface1337 commented on Aug 23, 2025

    @Ghostyface1337
    Contributor

    The tool tries to encrypt the UCAS with the original AES key here:

    if (aes.KeyString != Constants.DefaultAES)
    {
    var b = File.ReadAllBytes(Path.ChangeExtension(outFilename, ".ucas"));
    var encrypted = CryptographyHelpers.EncryptAES(b, aes.Key);
    File.WriteAllBytes(Path.ChangeExtension(outFilename, ".ucas"), encrypted);
    }

    And sets the flag inside the UTOC, but does not encrypt the UTOC directory index.

    Imo, I don't really see the use for encrypting the resulting files. Maybe having it as an argument would be nice.

  3. rm-NoobInCoding commented on Apr 18, 2026

    @rm-NoobInCoding
    Owner

    Fixed in #73 — --aes-key no longer implies output encryption. Encrypting the output is now opt-in via --encrypt-output, so the EncryptedContainerFlag isn't set on the UTOC unless you actually ask for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions