Skip to content

fix: default salt encoding to 1AAH like signify-ts#143

Merged
kentbull merged 1 commit into
WebOfTrust:mainfrom
kentbull:cleanup-sxlt-cipher-selection
May 6, 2026
Merged

fix: default salt encoding to 1AAH like signify-ts#143
kentbull merged 1 commit into
WebOfTrust:mainfrom
kentbull:cleanup-sxlt-cipher-selection

Conversation

@kentbull
Copy link
Copy Markdown
Collaborator

@kentbull kentbull commented May 6, 2026

My W3C crosswalk work surfaced an interesting bug in SignifyPy regarding salt encryption (SaltyKeeper.params.sxlt).

Background

SignifyTS was always using 1AAH, the X25519_Cipher_Salt, a fixed size salt cipher, and thusly never had to worry about variable size cipher salts like 4C / X25519_Cipher_L0, a variable X25519 salt cipher. So, the implicit rule for Encrypter.encrypt() in SignifyTS was that everything used 1AAH / X25519_Cipher_Salt by default.

Problem

Yet SignifyPy had a different default. This is due to KERIpy's default in Encrypter.encrypt() having the default set as so:

class Encrypter(Matter):
    ...
    def encrypt(...):
        ...
        if not code:  # assumes default is sniffable stream
            code = CiXDex.X25519_Cipher_L0

which meant that SignifyPy's default for salt encryption was 4C, not 1AAH.

I hit this sometime between 11:30 PM and 12:30 AM on Tuesday night of IIW last week trying to get the demo working and since I had not yet figured this out then I just added variable size code support to SignifyTS' Matter._exfil and Matter._infil, which meant a few code table entries got added in including the 4C ..._L0 code X25519_Cipher_L0. This was the wrong solution and I am backing those changes out. The right solution is below.

Fix

The fix is simple. Inside of SignifyPy the calls to Encrypter.encrypt() just need an explicit code specified that lines up with the SignifyTS default: X25519_Cipher_Salt.

Signed-off-by: Kent Bull <kent@kentbull.com>
@kentbull kentbull merged commit b05acad into WebOfTrust:main May 6, 2026
3 checks passed
@kentbull kentbull deleted the cleanup-sxlt-cipher-selection branch May 6, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant