ComfyUI Node

Affine Cipher

A ComfyUI node in ARG Toolkit/Cryptography/Classical with 6 inputs and 1 output.

By AzelusLightvale·Created 11 months ago·Updated 25 days ago· 1
Affine Cipher
    • encrypted_txt
    textHello World!
    alphabetENGLISH
    modetrue
    keep_formattingtrue
    key_17
    key_28
    CategoryARG Toolkit/Cryptography/Classical

    Inputs (6)

    NameTypeDefaultDescription
    textSTRINGHello World!
    alphabetSTRINGENGLISHInput your alphabet here. If left blank, uses the alphabet default to the cipher. Uses standard connected format ('abcdef'), but can also accept the alphabets defined in secretpy in alphabets.py.
    modeBOOLEANtrueToggle between encrypting or decrypting a message.
    keep_formattingBOOLEANtrueToggle between preserving the format of the message or remove all spaces, punctuations, and convert to lowercase.
    key_1INT7The multiplicative part of the Affine key. Allows only numbers with no common factors to the alphabet length (relatively prime).
    key_2INT8The additive part of the Affine key. Allows every integer from 0 up to the length of the alphabet minus 1 (imagine an index starting from 0).

    Outputs (1)

    NameTypeDescription
    encrypted_txtSTRING