encodePlaintext

Encode arbitrary card plaintext into the SRA domain for SraScheme.

Prepends a 0x01 marker byte. This guarantees the encoded value is:

  • = 2 (the marker makes the high byte nonzero; for non-empty input the value is >= 256), so it is never the 0 or 1 encryption fixed point; and

  • canonically encoded (nonzero high byte), so BigInteger round-trips it without dropping leading zeros.

Apply ONCE when building the deck, before the first encryption. Recover the original bytes with decodePlaintext after the final decryption. Do NOT apply per encryption layer.

plaintext must be non-empty (an empty card has no secure SRA encoding).