• What you should know about AEC

    From Anne Frank@bounce.me@n2n.oc2mx.net to alt.privacy.anon-server,alt.cypherpunks,sci.crypt on Sat Jun 13 20:30:06 2026
    From Newsgroup: sci.crypt

    AEC usage should probably not spread around the globe,
    as my articles about AEC have been so far deleted on:

    1. Hacker News

    2. reddit/cryptography (I am permanently banned there)

    3. German Kuketz forum

    Maybe you guys and gals can spread the usage of AEC.
    --
    -----BEGIN ED25519 SIGNATURE----- 8a5f8adfec9690b8ae6ca95dc23811463fcce5bbba0d841f49b7d3f7a89ad149 b15c52518cbfcb722ad8609c5bd0dfc6aea90cd910a90f22f1230615e49baaf0 e7c5a89fa23ee89a2bfe224bd7648886fb8b14aaff8aadb37d3651fda2717a02
    -----END ED25519 SIGNATURE-----


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ch1ffr3punk@ch1ffr3punk@gmail.com to alt.privacy.anon-server,alt.cypherpunks,sci.crypt on Mon Jun 15 21:04:03 2026
    From Newsgroup: sci.crypt

    Anne Frank wrote:

    AEC usage should probably not spread around the globe,
    as my articles about AEC have been so far deleted on:

    1. Hacker News

    2. reddit/cryptography (I am permanently banned there)

    3. German Kuketz forum

    Maybe you guys and gals can spread the usage of AEC.


    However, the friendly folks a pitchhut saw AEC on GitHub and added it:

    https://www.pitchhut.com/project/air-gapped-encrypted-communications

    To quote Harry Halpin, CEO of Nym, on Telegram:

    "Wikileaks was a big fan of airgapped communications.
    If I run into Julian at some point (probably soon)
    I will point him at your work @Ch1ffr3punk"

    Regards
    Stefan
    --
    https://oc2mx.net
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Nomen Nescio@nobody@dizum.com to alt.cypherpunks,alt.privacy.anon-server,sci.crypt on Tue Jun 16 01:54:54 2026
    From Newsgroup: sci.crypt

    AEC usage should probably not spread around the globe,
    as my articles about AEC have been so far deleted on:

    1. Hacker News

    2. reddit/cryptography (I am permanently banned there)

    3. German Kuketz forum

    Maybe you guys and gals can spread the usage of AEC.

    Reddit was once very good, but now it is less than a piece of crap.

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Gabx@victor@virebent.invalid to alt.privacy.anon-server,alt.cypherpunks,sci.crypt on Tue Jun 16 20:13:56 2026
    From Newsgroup: sci.crypt

    Ch1ffr3punk wrote:
    To quote Harry Halpin, CEO of Nym, on Telegram:

    "Wikileaks was a big fan of airgapped communications.
    If I run into Julian at some point (probably soon)
    I will point him at your work @Ch1ffr3punk"

    I'm happy for you
    I mean it.

    Gabx

    --- Digital Signature --- fPHNBbkk+H3poSeLmmlEpoyyoeyE5Gdpied02waf62QjWyIdrBY8AIEvXaPvwL2JB09S7bA6u7GYoLTFrycsBQ==

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Ch1ffr3punk@ch1ffr3punk@gmail.com to alt.privacy.anon-server,alt.cypherpunks,sci.crypt on Tue Jun 16 20:32:05 2026
    From Newsgroup: sci.crypt

    Gabx wrote:
    Ch1ffr3punk wrote:
    To quote Harry Halpin, CEO of Nym, on Telegram:

    "Wikileaks was a big fan of airgapped communications.
    If I run into Julian at some point (probably soon)
    I will point him at your work @Ch1ffr3punk"

    I'm happy for you
    I mean it.

    Thanks, much appreciated.

    Best regards
    Stefan
    --
    https://oc2mx.net
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Tue Jun 16 13:36:25 2026
    From Newsgroup: sci.crypt

    On 6/13/2026 11:30 AM, Anne Frank wrote:
    AEC usage should probably not spread around the globe,
    as my articles about AEC have been so far deleted on:

    1. Hacker News

    2. reddit/cryptography (I am permanently banned there)

    Why?



    3. German Kuketz forum

    Maybe you guys and gals can spread the usage of AEC.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anne Frank@bounce.me@n2n.oc2mx.net to alt.privacy,sci.crypt on Thu Jun 18 14:04:59 2026
    From Newsgroup: sci.crypt

    Chris M. Thomasson wrote:
    On 6/13/2026 11:30 AM, Anne Frank wrote:
    AEC usage should probably not spread around the globe,
    as my articles about AEC have been so far deleted on:

    1. Hacker News

    2. reddit/cryptography (I am permanently banned there)

    Why?

    Because they are assholes.


    3. German Kuketz forum

    Maybe you guys and gals can spread the usage of AEC.



    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Thu Jun 18 05:59:14 2026
    From Newsgroup: sci.crypt

    On 6/18/2026 5:04 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/13/2026 11:30 AM, Anne Frank wrote:
    AEC usage should probably not spread around the globe,
    as my articles about AEC have been so far deleted on:

    1. Hacker News

    2. reddit/cryptography (I am permanently banned there)

    Why?

    Because they are assholes.

    they interrogated my work big time, but never got banned.




    3. German Kuketz forum

    Maybe you guys and gals can spread the usage of AEC.




    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anne Frank@bounce.me@n2n.oc2mx.net to alt.privacy,sci.crypt on Thu Jun 18 15:30:17 2026
    From Newsgroup: sci.crypt

    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Thu Jun 18 07:59:20 2026
    From Newsgroup: sci.crypt

    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anne Frank@bounce.me@n2n.oc2mx.net to alt.privacy,sci.crypt on Thu Jun 18 17:50:57 2026
    From Newsgroup: sci.crypt

    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on this link?


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Thu Jun 18 12:37:06 2026
    From Newsgroup: sci.crypt

    On 6/18/2026 8:50 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on this link?



    Try to tamper with the url...
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anne Frank@bounce.me@n2n.oc2mx.net to alt.privacy,sci.crypt on Thu Jun 18 22:27:29 2026
    From Newsgroup: sci.crypt

    Chris M. Thomasson wrote:
    On 6/18/2026 8:50 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on this link?



    Try to tamper with the url...

    Your reply took several hours to formulate a not convincing answer...

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Thu Jun 18 14:25:53 2026
    From Newsgroup: sci.crypt

    On 6/18/2026 1:27 PM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 8:50 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on this link? >>>


    Try to tamper with the url...

    Your reply took several hours to formulate a not convincing answer...


    Tamper with the payload in the url. See what you get?
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Anne Frank@bounce.me@n2n.oc2mx.net to alt.privacy,sci.crypt on Fri Jun 19 01:57:30 2026
    From Newsgroup: sci.crypt

    Chris M. Thomasson wrote:
    On 6/18/2026 1:27 PM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 8:50 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on this link?



    Try to tamper with the url...

    Your reply took several hours to formulate a not convincing answer...


    Tamper with the payload in the url. See what you get?

    Moron, nobody will enter and click this URL in a browser
    until you have clearly stated if this site is secure and
    tamper resistant, so that the code can't be modified!!!!

    *Got it?* (Probably not...)

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Fri Jun 19 13:20:45 2026
    From Newsgroup: sci.crypt

    On 6/18/2026 4:57 PM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 1:27 PM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 8:50 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on this link?



    Try to tamper with the url...

    Your reply took several hours to formulate a not convincing answer...


    Tamper with the payload in the url. See what you get?

    Moron, nobody will enter and click this URL in a browser
    until you have clearly stated if this site is secure and
    tamper resistant, so that the code can't be modified!!!!

    Oh I know why you got banned. You are the ass? Ms Frank?


    *Got it?* (Probably not...)
    You mean from cloudflare? The only reason I use that is for free HTTPS.
    You are the total moron who thinks I made that page for a real use
    cipher! I just did it for an example. Moron.

    Have a nice day asshole.


    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Fri Jun 19 13:24:05 2026
    From Newsgroup: sci.crypt

    On 6/19/2026 1:20 PM, Chris M. Thomasson wrote:
    On 6/18/2026 4:57 PM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 1:27 PM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 8:50 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:
    On 6/18/2026 6:30 AM, Anne Frank wrote:
    Chris M. Thomasson wrote:

    they interrogated my work big time, but never got banned.

    That's because your projects are mostly small hobby projects
    and not global game-changers where TLAs no longer stand a
    chance against the use of AEC.



    https://fractallife247.com/test/hmac_cipher/drmoron/?
    ct_hmac_cipher=d61b8fadf16aafce047e35c06bb8b12b9057091c90d17493d02eb98cb3d96f19c3eb3fac2d85a01580579946ac14c5c9494dd5f88bece117c9a7ea556ddc72958012ec8a611791f9878cc22d4ecfa32f46f3b7c669395f1ddf559acb

    ;^)

    Is this site secure and tamper resistant prior someone clicks on
    this link?



    Try to tamper with the url...

    Your reply took several hours to formulate a not convincing answer...


    Tamper with the payload in the url. See what you get?

    Moron, nobody will enter and click this URL in a browser
    until you have clearly stated if this site is secure and
    tamper resistant, so that the code can't be modified!!!!

    Oh I know why you got banned. You are the ass? Ms Frank?


    *Got it?* (Probably not...)
    You mean from cloudflare? The only reason I use that is for free HTTPS.
    You are the total moron who thinks I made that page for a real use
    cipher! I just did it for an example. Moron.

    Have a nice day asshole.



    Fwiw, here is the guts:

    // Chris M. Thomassons Experimental HMAC Cipher
    // Version 0.0.0.2 (UTF-8 + C interop)
    // Using the following HMAC library:
    // https://github.com/h2non/jshashes //___________________________________________________

    "use strict";

    // UTF-8 helpers (text <-> bytes) //___________________________________________________
    function ct_utf8_encode_to_bytes(str) {
    return Array.from(new TextEncoder().encode(str));
    }

    function ct_utf8_decode_from_bytes(bytes) {
    return new TextDecoder().decode(new Uint8Array(bytes));
    }

    // Byte/string helpers (0rCo255 codes <-> JS string)
    // These are used for HMAC input and hex conversion. //___________________________________________________
    function ct_string_to_codes(origin) {
    var output = [];
    for (var i = 0; i < origin.length; ++i) {
    output.push(origin.charCodeAt(i) & 0xFF);
    }
    return output;
    }

    function ct_codes_to_string(origin) {
    var output = "";
    for (var i = 0; i < origin.length; ++i) {
    output += String.fromCharCode(origin[i] & 0xFF);
    }
    return output;
    }

    // Hex <-> byte-string helpers //___________________________________________________
    function ct_hexbytes_to_string(origin, offset) {
    var pstring = "";
    var lookup = "0123456789abcdef";
    var imax = origin.length;

    for (var i = offset + 1; i < imax; ++i) {
    var high_nibble = lookup.indexOf(origin[i - 1]);
    var low_nibble = lookup.indexOf(origin[i]);

    if (high_nibble > -1 && low_nibble > -1) {
    var c = high_nibble * 16 + low_nibble;
    pstring = pstring + String.fromCharCode(c);
    ++i;
    }
    }

    return pstring;
    }

    function ct_string_to_hexbytes(origin, offset) {
    var hexbytes = "";
    var lookup = "0123456789abcdef";
    var imax = origin.length;

    for (var i = offset; i < imax; i++) {
    var c = origin.charCodeAt(i) & 0xFF;
    var low_nibble = c & 0x0F;
    var high_nibble = (c & 0xF0) >> 4;

    hexbytes = hexbytes + lookup[high_nibble];
    hexbytes = hexbytes + lookup[low_nibble];
    }

    return hexbytes;
    }

    // Misc utilities
    //___________________________________________________
    function ct_string_reverse(s) {
    return Array.from(s).reverse().join("");
    }

    // Set this to true when you want to match the C test vector
    const CT_TEST_VECTOR = false;

    function ct_rand_bytes(n) {
    if (CT_TEST_VECTOR) {
    // Deterministic prefix: 0,1,2,3,... like the C test vector
    let out = new Array(n);
    for (let i = 0; i < n; i++) out[i] = i & 0xFF;
    return out;
    }

    // Normal cryptographically secure mode
    if (window.crypto && window.crypto.getRandomValues) {
    var output = new Uint8Array(n);
    window.crypto.getRandomValues(output);
    return Array.from(output);
    } else {
    alert("FATAL ERROR: Browser does not support TRNG!");
    throw new Error("crypto.getRandomValues missing");
    }
    }


    // HMAC wrapper (raw-byte strings, no UTF-8 inside) //___________________________________________________
    function ct_hmac(key, hash) {
    this.m_key = key; // JS string, treated as raw bytes
    this.m_data = "";
    this.m_hash = hash;
    this.m_hash.setUTF8(false); // interpret strings as raw bytes
    }

    ct_hmac.prototype.clear = function () {
    this.m_data = "";
    };

    ct_hmac.prototype.update = function (data) {
    // data is a JS string whose charCodes are 0rCo255
    this.m_data += data;
    };

    ct_hmac.prototype.digest = function () {
    return this.m_hash.hex_hmac(this.m_key, this.m_data);
    };

    // Secret key wrapper
    //___________________________________________________
    function ct_hmac_cipher_skey(rand_n, hmac) {
    this.m_rand_n = rand_n;
    this.m_hmac = hmac;
    }

    function ct_hmac_cipher_skey_get_hash_algo() {
    var hmac_algo =
    ct_gui_parse_radio_checked("g_ct_html_input_key_hmac", "SHA256");

    if (hmac_algo == "SHA256") {
    return new Hashes.SHA256;
    }

    return new Hashes.SHA512;
    }

    // HMAC Cipher
    //___________________________________________________
    function ct_hmac_cipher(skey) {
    this.m_skey = skey;
    }

    // P is an array of bytes (numbers 0rCo255) ct_hmac_cipher.prototype.crypt_round = function (P, M) {
    var H = this.m_skey.m_hmac;
    H.clear();
    H.update(ct_string_reverse(H.m_key));

    var C = [];

    var digest_n = 0;
    var digest_output = "";

    var I_P = 0;
    var I_P_N = P.length;

    while (I_P < I_P_N) {
    var digest_hex = H.digest();
    var digest_string = ct_hexbytes_to_string(digest_hex, 0);
    var D = ct_string_to_codes(digest_string); // 64 bytes for SHA-512

    digest_output += "[" + digest_n + "]:" + digest_hex + "\n";
    ++digest_n;

    var I_D = 0;

    while (I_P < I_P_N && I_D < D.length) {
    var P_byte = P[I_P] & 0xFF;
    var C_I_P = P_byte ^ (D[I_D] & 0xFF);

    C.push(C_I_P);

    var U;
    if (M == false) {
    U = ct_codes_to_string([P_byte, C_I_P]);
    } else {
    U = ct_codes_to_string([C_I_P, P_byte]);
    }
    H.update(U);

    I_P = I_P + 1;
    I_D = I_D + 1;
    }
    }

    ct_gui_parse_append_element_to_string("g_ct_html_input_digests", digest_output);

    return C;
    };

    // Core byte-level crypt function
    // P is an array of bytes; returns array of bytes ct_hmac_cipher.prototype.crypt_bytes = function (P, M) {
    var P_work = P.slice();

    if (M == false) {
    var R = ct_rand_bytes(this.m_skey.m_rand_n);
    P_work = R.concat(P_work);
    }

    ct_gui_parse_append_element_to_string("g_ct_html_input_digests",
    "Round 0...\n");
    var C = this.crypt_round(P_work, M);
    C.reverse();
    ct_gui_parse_append_element_to_string("g_ct_html_input_digests",
    "Round 1...\n");
    C = this.crypt_round(C, M);

    if (M == true) {
    C.splice(0, this.m_skey.m_rand_n);
    }

    return C;
    };

    function ct_hmac_cipher_create() {
    var key_text =
    ct_gui_parse_string_from_element("g_ct_html_input_key", "Password");

    // Key is treated as raw bytes for HMAC; we map UTF-8 bytes to a byte-string
    var key_bytes = ct_utf8_encode_to_bytes(key_text);
    var key_str = ct_codes_to_string(key_bytes);

    var rand_n =
    ct_gui_parse_int_from_element("g_ct_html_input_key_rand_n", 64);
    var cipher_hash = ct_hmac_cipher_skey_get_hash_algo();
    var cipher_skey = new ct_hmac_cipher_skey(rand_n, new
    ct_hmac(key_str, cipher_hash));
    var cipher = new ct_hmac_cipher(cipher_skey);

    return cipher;
    }

    // Main app
    //___________________________________________________
    function ct_main_app() { }

    // Entry
    //___________________________________________________
    var g_ct_main_app = null;

    function ct_main() {
    if (g_ct_main_app) return;
    g_ct_main_app = new ct_main_app();

    ct_html_on_encrypt_click();
    ct_html_on_parse_url_click();
    ct_html_on_generate_url_click();
    }

    // GUI Handlers
    //___________________________________________________
    function ct_html_on_encrypt_click() {
    var cipher = ct_hmac_cipher_create();

    var plaintext = ct_gui_parse_string_from_element("g_ct_html_input_plaintext", "Plaintext");

    var plaintext_bytes = ct_utf8_encode_to_bytes(plaintext);
    var total_bytes = plaintext_bytes.length + cipher.m_skey.m_rand_n;

    ct_gui_parse_element_to_string(
    "g_ct_html_input_digests",
    "Encrypting " + total_bytes + " bytes...\n"
    );

    var ciphertext_bytes = cipher.crypt_bytes(plaintext_bytes, false);
    var ciphertext_string = ct_codes_to_string(ciphertext_bytes);
    var ciphertext_hex = ct_string_to_hexbytes(ciphertext_string, 0);

    ct_gui_parse_element_to_string("g_ct_html_input_ciphertext", ciphertext_hex);

    ct_html_on_generate_url_click();
    }

    function ct_html_on_decrypt_click() {
    var cipher = ct_hmac_cipher_create();

    var ciphertext_hex = ct_gui_parse_string_from_element("g_ct_html_input_ciphertext", "Plaintext");
    var ciphertext_str = ct_hexbytes_to_string(ciphertext_hex, 0);
    var ciphertext_bytes = ct_string_to_codes(ciphertext_str);

    ct_gui_parse_element_to_string(
    "g_ct_html_input_digests",
    "Decrypting " + ciphertext_bytes.length + " bytes...\n"
    );

    var plaintext_bytes = cipher.crypt_bytes(ciphertext_bytes, true);
    var plaintext = ct_utf8_decode_from_bytes(plaintext_bytes);

    ct_gui_parse_element_to_string("g_ct_html_input_plaintext", plaintext);
    }

    function ct_html_on_generate_url_click() {
    var ciphertext_hex = ct_gui_parse_string_from_element("g_ct_html_input_ciphertext", "Plaintext");
    var url_prefix = "https://fractallife247.com/test/hmac_cipher/drmoron/?ct_hmac_cipher=";
    var url = url_prefix + ciphertext_hex;

    ct_gui_parse_element_to_string("g_ct_html_input_ciphertext_url", url);
    }

    function ct_html_on_parse_url_click() {
    var url_search = window.location.search;
    var url_params = new URLSearchParams(url_search);
    var ct_hmac_cipher = url_params.get("ct_hmac_cipher");

    if (ct_hmac_cipher) {
    ct_gui_parse_element_to_string("g_ct_html_input_ciphertext", ct_hmac_cipher);
    ct_html_on_decrypt_click();
    }
    }

    // GUI helpers
    //___________________________________________________
    function ct_gui_parse_checkbox(id, d) {
    var celm = document.getElementById(id);
    if (!celm) return d;
    return celm.checked;
    }

    function ct_gui_parse_float_from_element(id, d) {
    var celm = document.getElementById(id);
    if (!celm) return d;
    var n = parseFloat(celm.value);
    if (isNaN(n)) { alert("ct_gui_parse_float_from_element error!");
    return d; }
    return n;
    }

    function ct_gui_parse_int_from_element(id, d) {
    var celm = document.getElementById(id);
    if (!celm) return d;
    var n = parseInt(celm.value, 10);
    if (isNaN(n)) { alert("ct_gui_parse_int_from_element error!");
    return d; }
    return n;
    }

    function ct_gui_parse_string_from_element(id, d) {
    var celm = document.getElementById(id);
    if (!celm) return d;
    return celm.value;
    }

    function ct_gui_parse_element_to_string(id, d) {
    var celm = document.getElementById(id);
    if (!celm) return false;
    celm.value = d;
    return true;
    }

    function ct_gui_parse_append_element_to_string(id, d) {
    var celm = document.getElementById(id);
    if (!celm) return false;
    celm.value += d;
    return true;
    }

    function ct_gui_parse_radio_checked(id, d) {
    var q = document.querySelector("input[name=" + id + "]:checked");
    if (!q) return d;
    return q.value;
    }

    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Chris M. Thomasson@chris.m.thomasson.1@gmail.com to alt.privacy,sci.crypt on Fri Jun 19 13:26:58 2026
    From Newsgroup: sci.crypt

    On 6/19/2026 1:20 PM, Chris M. Thomasson wrote:
    [...]

    Fwiw, here is a quick C version:

    https://github.com/ChrisMThomasson/ct_HMAC_Cipher_Experiment
    --- Synchronet 3.22a-Linux NewsLink 1.2