• NEWSCARD * Publish and fetch permanent named records via Network News (

    From Byrl Raze Buckbriar@21:1/5 to All on Sat Feb 8 23:49:22 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    * NEWSCARD * Publish and fetch permanent named records via Network News

    Newscard creates a decentralized, named record pastebin.

    [git repo] https://codeberg.org/OCTADE/newscard

    * NEWSCARD VERSION 0.0.1.D *

    * TABLE OF CONTENTS *

    1. NEWSCARD INFO
    2. NEWSCARD TIPS
    3. NEWSCARD HELP AND USAGE
    4. NEWSCARD TEST KEYS
    5. NEWSCARD SOURCE CODE (xz compressed base64)
    6. NEWSCARD SOURCE CODE (plain text)

    * 1. NEWSCARD INFO *

    Author: Byrl Raze Buckbriar (https://octade.net) (news://alt.rhubarb)

    Newscard encrypts a local text file and publishes it via NNTP.
    The name assigned to the card is the address and passphrase.
    Anyone who knows the name or passphrase can retrieve the card.
    A very strong passphrase will keep the card content secret.
    Newscard uses nine layers of encryption and chain hashes that are
    derived from multiple hash streams and large, random salt.
    Use 'tuff' mode for very strong encryption passphrases.

    Try 'card help' for usage instructions.

    User License: Use solely at your own risk. By using this software the user
    agrees that the author has zero liability for any loss, harm, or damage.
    This software is 'doodleware' and not fit for any commercial purpose.
    The user has no rights whatsoever related to the use of this software
    or any thing arising from such use. The user must agree to this license
    to use the software. There is no support, guarantee, or warranty.

    * 2. NEWSCARD TIPS *

    Ways you can use newscard include:

    1. Publishing and retrieving scripts, sources, and articles with a phrase.
    2. Publishing a personal profile others can retrieve with a keyword.
    3. Exchanging encrypted messages (using strong keys or 'tuff' mode).
    4. Including newscard keys in signatures and articles.

    Once published, a newscard remains a permanent record.

    * 3. NEWSCARD HELP AND USAGE *

    WARNING: Use 'tuff' mode for high security against decryption.
    Tuff mode generates cards with high-security, strong passphrases.
    Enc mode forces a minimum custom key size and still may be insecure.
    Enc mode should be used if you want the public to decrypt the card.
    Tuff mode should be used to prevent the public from reading the card.

    show this help message : card help
    show some tips and use cases : card tips
    show author and license info : card info
    generate highly secure news card : card tuff [path|file]
    generate news card via password : card enc [passphrase] [path|file]
    fetch card from network : card get [passphrase]
    publish card to network : card put [passphrase]
    read text of local news card : card show [passphrase]
    list stored cards by folder : card list [draft|queue|inbox|sent]

    Author: Byrl Raze Buckbriar (https://octade.net) (news://alt.rhubarb)

    * 4. NEWSCARD TEST KEYS *

    Users may test the Newscard application by fetching these cards by key:

    sample1 | sample2 | sample3 | octade | newscard0

    To fetch a card use the command: card get [key].

    Examples below can be tried for cards that are already on the network:

    $~: card get newscard
    $~: card get 8
    $~: card get sample1

    * 5. NEWSCARD SOURCE CODE (xz compressed base64) *

    (commands to decompress: cat | base64 -d | unxz)

    /Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4HGnIRZdABGIQkeKIzPDdw8z/VWX7afG1TtMjx4Klj/K qRSaY/9mHLTgnv2rlXMCipeP3+asphkGaWjYbuUt7ZKSfeshGyfAt26iblkA1W4Y/w0EYc5jDh6y 1+wfKAYCyQWC6qrMlcVqDo0bE92XgP7Z7/RZSNWQ2lLHSp5RwundXOgSHqvSUFovHjdSe1HYxaUX fUy7lwF9KqnLBcOzzi9zsfKvno3U5S5b6+XZAkGkDNBgRshVFt6GHB6rw2zCa7WPyyUWwWvd1NFl h/4ldGC/8rCqwF8vhOihBN4oQZm1CDYQ5yy5cZwA0Nnt4L0pN7mL562GL2RMfppMoz/eiHTevUJO Zspt7dB4cS0S5YZCcD9XZWfFj/2H8ogj5MUnCwqcy7FDb3EOkJYQ6bTMuJXWyzNBXC6EiI4h/Vdr D53q3iId4JfFndN89j3vU/LlJFiRvzvxKh9MCc6tjoK7lHH+w0mA9OW6meJNlRXmlcW77/b1xAAJ HpofGOnmEBw/RkTjer289olt6DsvI8JFxZkVj7XWVTeL0h8bm3sG3yOhJcl+Fh17DcDJrrv7jA8x oJ2tgbdxHzcpJ6jzIKN7QZgKwhMwnrGCe8xTfDKopHdiejDOskxPNX7GTRV8XOtByF8qktaXz7x6 xozeQrHJbOFam84s8FMzw2ic0NY6ud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/bin/env bash

    # NEWSCARD VERSION 0.0.1.D - Use subject to license included below.
    # ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄
    # █ █ █ █ █ █ █ █ █▄▄ Byrl Raze Buckbriar # █▄█ █▄▄ █ █▀█ █▄▀ █▄▄ https://octade.net

    # warning: this is a 'D' version for DOODLE. It is likely to have eventual regression in the key generation and card schema format--that breaks backward compatibility. The purpose of the doodle version is to test and generate feedback for improvement.
    Expect a final regression rendering existing newscards inaccessible to the final version.

    # zombies: some unused code and paths here for future features. sections labeled 'zombie'.

    # INSTALL: Copy to $PATH and make executable (chmod u+x).

    # BEGIN.NEWSCARD

    DIE() { echo "$@" && exit 0 ; }
    ERR() { echo "CARD: ERR: $@" 1>&2 && exit 1 ; }

    check_deps() {
    deps="tor bash b2sum base64 echo fold grep head less nc openssl shuf tail tee tr whoami xxd xz"
    for prog in $deps
    do
    [[ $(which $prog) == '' ]] && ERR "[DEP1] Program ($prog) not found." && exit 1 done
    }

    check_deps

    HELPTEXT="* NEWSCARD HELP AND USAGE *

    WARNING: Use 'tuff' mode for high security against decryption.
    Tuff mode generates cards with high-security, strong passphrases.
    Enc mode forces a minimum custom key size and still may be insecure.
    Enc mode should be used if you want the public to decrypt the card.
    Tuff mode should be used to prevent the public from reading the card.

    show this help message : card help
    show some tips and use cases : card tips
    show author and license info : card info
    generate highly secure news card : card tuff [path|file]
    generate news card via password : card enc [passphrase] [path|file]
    fetch card from network : card get [passphrase]
    publish card to network : card put [passphrase]
    read text of local news card : card show [passphrase]
    list stored cards by folder : card list [draft|queue|inbox|sent]

    Author: Byrl Raze Buckbriar (https://octade.net) (news://alt.rhubarb)"

    TIPSTEXT="* NEWSCARD TIPS *

    Ways you can use newscard include:

    1. Publishing and retrieving scripts, sources, and articles with a phrase.
    2. Publishing a personal profile others can retrieve with a keyword.
    3. Exchanging encrypted messages (using strong keys or 'tuff' mode).

    Once published, a newscard remains a permanent record."

    INFOTEXT="* NEWSCARD INFO *

    Author: Byrl Raze Buckbriar (https://octade.net) (news://alt.rhubarb)

    Newscard encrypts a local text file and publishes it via NNTP.
    The name assigned to the card is the address and passphrase.
    Anyone who knows the name or passphrase can retrieve the card.
    A very strong passphrase will keep the card content secret.
    Newscard uses nine layers of encryption and chain hashes that are
    derived from multiple hash streams and large, random salt.
    Use 'tuff' mode for very strong encryption passphrases.

    Try 'card help' for usage instructions.

    User License: Use solely at your own risk. By using this software the user
    agrees that the author has zero liability for any loss, harm, or damage.
    This software is 'doodleware' and not fit for any commercial purpose.
    The user has no rights whatsoever related to the use of this software
    or any thing arising from such use. The user must agree to this license
    to use the software. There is no support, guarantee, or warranty."


    show_help() { DIE "$HELPTEXT" ; } # FIN.
    show_info() { DIE "$INFOTEXT" ; } # FIN.
    show_tips() { DIE "$TIPSTEXT" ; } # FIN.

    # non-global variables: session

    # global variables : TODO : zombies for future features
    declare -g arg1 arg2 arg3 arg4 arglen
    declare -g pp1 pp2 passphrase hash msgid subid keyid
    declare -g filename mode flag article msg newmsg mray stripcard
    declare -g nzconf nzlogs nzmani nzpath nzprox nzqqqq zdraft narxiv nzread nzsent nzserv nzuser nzwarn
    declare -g iter=() salt=() hashphrase=()
    declare -g x inum bigsalt encsalt
    declare -g newserv port logfile logtrunc
    declare -g config_data proxy_data warn_data
    declare -g prefix version
    declare -g cip pak
    declare -g listfolder

    prefix="NEWSCARD"
    version="0.0.1.D"

    arglen=${#@}

    # push command arguments to global variables
    arg1="$1" ; arg2="$2" ; arg3="$3" ; arg4="$4"

    # exit if too many arguments found
    [[ "$arg4" != '' ]] && ERR "[ARG4] Too many arguments. Try mode 'help'."
    [[ $arglen -gt 3 ]] && ERR "[ARG3] Too many arguments. Try mode 'help'." # edge case zombie code

    mode=$arg1 # arg1 must always be a valid mode selector word

    set_mode() {
    # zombie : future refactoring, so some of these modes are not enabled
    # valid modes : enc, dec, get, put, show, list, delete, put_unencrypted, save, export, help
    # read the first command argument
    [[ "$mode" == "help" ]] && show_help
    [[ "$mode" == "info" ]] && show_info
    [[ "$mode" == "tips" ]] && show_tips
    [[ "$mode" == "enc" ]] && flag='true'
    [[ "$mode" == "tuff" ]] && flag='true'
    [[ "$mode" == "dec" ]] && flag='true'
    [[ "$mode" == "get" ]] && flag='true'
    [[ "$mode" == "put" ]] && flag='true'
    [[ "$mode" == "show" ]] && flag='true'
    [[ "$mode" == "list" ]] && flag='true'
    #[[ "$mode" == "delete" ]] && flag='true' # zombie
    #[[ "$mode" == "put_unencrypted" ]] && flag='true' # zombie
    #[[ "$mode" == "save" ]] && flag='true' # zombie
    #[[ "$mode" == "export" ]] && flag='true' # zombie
    #[[ "$mode" == "pix" ]] && flag='true' # zombie
    #[[ "$mode" == "send" ]] && flag='true' # zombie

    # check for a valid mode before continuing
    [[ "$flag" != 'true' ]] && ERR "[FLAG1] Invalid mode selection ($mode) or wrong # of arguments. Try mode 'help'."

    # check for correct number of commandline arguments for mode
    [[ "$mode" == "enc" ]] && [[ $arglen -ne 3 ]] && flag='false'
    [[ "$mode" == "tuff" ]] && [[ $arglen -ne 2 ]] && flag='false'
    [[ "$mode" == "dec" ]] && [[ $arglen -ne 2 ]] && flag='false'
    [[ "$mode" == "get" ]] && [[ $arglen -ne 2 ]] && flag='false'
    [[ "$mode" == "put" ]] && [[ $arglen -ne 2 ]] && flag='false'
    [[ "$mode" == "show" ]] && [[ $arglen -ne 2 ]] && flag='false'
    [[ "$mode" == "list" ]] && [[ $arglen -ne 2 ]] && flag='false'
    # zombie : future refactoring
    #[[ "$mode" == "delete" ]] && [[ $arglen -ne 2 ]] && flag='false' # zombie
    #[[ "$mode" == "put_unencrypted" ]] && [[ $arglen -ne 3 ]] && flag='false' # zombie
    #[[ "$mode" == "save" ]] && [[ $arglen -ne 3 ]] && flag='false' # zombie
    #[[ "$mode" == "export" ]] && [[ $arglen -ne 2 ]] && flag='false' # zombie
    #[[ "$mode" == "pix" ]] && [[ $arglen -ne 2 ]] && flag='false' # zombie

    [[ "$flag" == 'false' ]] && ERR "[FLAG2] Wrong # of arguments for mode ($mode). Try mode 'help'."

    # copy command argument parameters to variables based upon mode
    [[ "$mode" == "enc" ]] && passphrase=$arg2 && filename=$arg3 # && echo $arg3 && echo $filename && exit
    [[ "$mode" == "tuff" ]] && passphrase='' && filename=$arg2 # && echo $arg3 && echo $filename && exit
    [[ "$mode" == "dec" ]] && passphrase=$arg2
    [[ "$mode" == "get" ]] && passphrase=$arg2
    [[ "$mode" == "put" ]] && passphrase=$arg2 && filename=$arg3
    [[ "$mode" == "show" ]] && passphrase=$arg2
    # zombie : future refactoring
    #[[ "$mode" == "delete" ]] && passphrase=$arg2 # zombie
    #[[ "$mode" == "put_unencrypted" ]] && passphrase=$arg2 && filename=$arg3 # zombie
    #[[ "$mode" == "save" ]] && passphrase=$arg2 && filename=$arg3 # zombie
    #[[ "$mode" == "export" ]] && passphrase=$arg2 && filename=$arg3 # zombie
    #[[ "$mode" == "pix" ]] && exit # zombie
    }

    set_mode # TODO need to position so it can be removed from functions below

    check_filename() { # TODO refactor or delete since filename is passed now
    # read file path to variable if mode includes file
    [[ ! -f $filename ]] && ERR "[FILE1] File not found." && exit 1
    }

    check_filesize() { # TODO refactor or delete since filename is passed now
    # read file path to variable if mode includes file
    [[ ! -f $filename ]] && ERR "[FILE2] File not found." && exit 1
    filesize=$(cat "$filename" | wc -c | tr -dc 0-9)
    [[ $filesize -gt 65536 ]] && ERR "[SIZE1] File size ($filesize) exceeds maximum (65536 bytes)." && exit 1
    }

    check_newscard_exists() { # TODO : zombie
    # read file path to variable if mode includes file
    [[ -f "$zdraft/$passphrase" ]] && ERR "[CNE1] A draft card already exists for this passphrase." && exit 1
    [[ -f "$zinbox/$passphrase" ]] && ERR "[CNE2] A inbox card already exists for this passphrase." && exit 1
    [[ -f "$nzqqqq/$passphrase" ]] && ERR "[CNE3] A queue card already exists for this passphrase." && exit 1
    [[ -f "$nzsent/$passphrase" ]] && ERR "[CNE4] A sent card already exists for this passphrase." && exit 1
    [[ -f "$narxiv/$passphrase" ]] && ERR "[CNE5] An archive card already exists for this passphrase." && exit 1
    [[ -f "$nzhist/$passphrase" ]] && ERR "[CNE6] An history card already exists for this passphrase." && exit 1
    # TODO : add method to check history and confirmed publish lists
    }

    # network connections - for now only torconn is used to force privacy.
    # zombie : future refactoring
    sslconn() {
    logfile=$nzconn
    openssl s_client -quiet -connect $newserv:$port >> $logfile 2>&1 # TODO : s_client info mucks up parsing
    logtrunc=$(cat "$logfile" | tail -n 4096)
    echo "$logtrunc" > "$logfile"
    }

    # zombie : future refactoring
    telconn() {
    nc $newserv $port >> $logfile 2>&1 # s_client info mucks up parsing logtrunc=$(cat "$logfile" | tail -n 4096)
    echo "$logtrunc" > "$logfile"
    } # TODO zombie code

    torconn() {
    # TODO : add authentication credential parsing
    logfile=$nzconn
    newserv=$(cat $nzserv | grep -v '#' | grep ':server:' | tail -n 1 | cut -d ':' -f3- | tr -d ' ')
    port=$(cat $nzserv | grep -v '#' | grep ':port:' | tail -n 1 | cut -d ':' -f3- | tr -d ' ')

    timeout 20 torsocks openssl s_client -quiet -verify_quiet -connect $newserv:$port | tee -a $logfile # 2>/dev/null # 2>&1 # TODO : s_client info mucks up parsing
    logtrunc=$(cat "$logfile" | tail -n 4096)
    echo "$logtrunc" > "$logfile"
    }

    # Check for config directory. Create directory and missing config files. set_conf_data() {
    config_data=":server: paganini.bofh.team
    :port: 563
    # username:
    # password:
    "
    echo "$config_data" > $nzserv
    }

    set_prox_data() {
    # TODO : zombie
    proxy_data="# host: 127.0.0.1
    # port: 9050
    "
    echo "$proxy_data" > $nzprox
    }

    set_warn_data() {
    warn_data="
    --------------------------------
    WARNING! README! INSTRUCTIONS!
    --------------------------------

    This folder contains the configuration files for the newscard application.

    If you do not know exactly what you are doing then you should not change
    any of these files. If you change the files in this folder you may break
    the application and cause errors or data loss. The file names are cipher
    keys and thus changing the file names will make decryption impossible.

    The program author WILL NOT respond to requests regarding broken configuration. The only way to fix a broken configuration is to re-install the program. This will likely result in the loss of all data. Back up your keycard passphrases and files regularly to prevent losing access to your files.

    ----------------------------------
    ABOUT THESE CONFIGURATION FOLDERS
    ----------------------------------

    config : configuration files (see below)
    draft : unpublished newscards
    inbox : downloaded newscards
    queue : newscards waiting to be sent
    sent : published newscards
    archive : archived newscards (not shown via inbox view)

    ---------------------------------
    ABOUT THESE CONFIGURATION FILES
    ---------------------------------

    newscard.server : NNTP server settings
    newscard.proxy : proxy settings
    newscard.manifest : component configuration data
    newscard.log : activity and error logs
    "

    echo "$warn_data" > $nzwarn
    echo "$warn_data" > $nzread
    }

    set_nzpaths() {
    # Set paths for functions to write and read files
    nzuser=$(whoami)
    nzpath="/home/$nzuser/.newscard"

    # Message directories
    nzsent="$nzpath/sent"
    zinbox="$nzpath/inbox"
    nzqqqq="$nzpath/queue"
    zdraft="$nzpath/draft"
    narxiv="$nzpath/archive"
    nzhist="$nzpath/history"

    # Configuration files
    nzconf="$nzpath/config"
    nzserv="$nzconf/newscard.server"
    nzprox="$nzconf/newscard.proxy"
    nzmani="$nzconf/newscard.manifest"
    nzlogs="$nzconf/newscard.log"
    nzconn="$nzconf/connect.log"

    # Warning files
    nzread="$nzpath/WARNING.README"
    nzwarn="$nzconf/WARNING.README"
    }

    # zombie : future refactoring
    create_config() {
    [[ ! -d $nzpath ]] && mkdir $nzpath && chmod 0700 $nzpath
    [[ ! -d $nzconf ]] && mkdir $nzconf && chmod 0700 $nzconf
    [[ ! -f $nzserv ]] && set_conf_data && chmod 0600 $nzserv
    [[ ! -f $nzmani ]] && touch $nzmani && chmod 0600 $nzmani
    [[ ! -f $nzlogs ]] && touch $nzlogs && chmod 0600 $nzlogs
    [[ ! -f $nzconn ]] && touch $nzconn && chmod 0600 $nzconn
    [[ ! -f $nzprox ]] && set_prox_data && chmod 0600 $nzprox
    [[ ! -d $nzsent ]] && mkdir $nzsent && chmod 0700 $nzsent
    [[ ! -d $zinbox ]] && mkdir $zinbox && chmod 0700 $zinbox
    [[ ! -d $zdraft ]] && mkdir $zdraft && chmod 0700 $zdraft
    [[ ! -d $nzqqqq ]] && mkdir $nzqqqq && chmod 0700 $nzqqqq
    [[ ! -d $narxiv ]] && mkdir $narxiv && chmod 0700 $narxiv
    [[ ! -d $nzhist ]] && mkdir $nzhist && chmod 0700 $nzhist
    [[ ! -f $nzwarn ]] && set_warn_data && chmod 0600 $nzwarn
    }

    set_list_paths() {
    # Set paths for functions to write and read files
    nzuser=$(whoami)
    nzpath="/home/$nzuser/.newscard"

    # Message directories (zombie)
    nzsent="$nzpath/sent"
    zinbox="$nzpath/inbox"
    nzqqqq="$nzpath/queue"
    zdraft="$nzpath/draft"
    narxiv="$nzpath/archive"
    nzhist="$nzpath/history"
    }

    check_config_folder() {
    nzpath="/home/code/.newscard"
    [[ ! -d $nzpath ]] && echo "Newscard config not found at '$nzpath'. Creating config now." && set_nzpaths && create_config
    }

    # Create configuration if not present.
    check_config_folder

    check_passphrase() {
    passphrase=$arg2 # arg vars work but passphrase global doesn't work pp1="$passphrase"
    pp2=$(echo "$pp1" | tr -dc A-Za-z0-9.@#+=_\\-~)
    [[ "$pp1" != "$pp2" ]] && ERR "[PP12] Invalid passphrase. Valid characters are 'A-Za-z0-9.@#+=_-~'."
    [[ ${#pp1} -gt 255 ]] && ERR "[PP255] Invalid passphrase. Passphrase must be less than 255 chars."
    }

    # Extra random generation for salts.
    ts() {
    echo "$(date +%N)$(date +%N)$(date +%N)$(date +%N)" | fold -w 1 | shuf | tr -dc 0-9
    }

    timestamp() {
    echo $(ts)$(ts)$(ts)$(ts)$(ts)$(ts)$(ts)$(ts) | fold -w 1 | shuf | tr -dc 0-9
    }

    minesalt() {
    bigsalt=$(timestamp)
    bigsalt=$(head -c 2048 /dev/urandom | xxd -p | fold -w 1 | shuf -n 1023 | sivhex | trisum)$bigsalt
    bigsalt=$(echo -n "$bigsalt" | fold -w 1 | shuf | sivhex | trisum)
    }

    # encoding and conversion functions (some zombie code for future refactoring) enchex() { xxd -p -r ; }
    dechex() { xxd -p -c 0 ; }
    encb64() { base64 -w 0 ; }
    decb64() { base64 -d ; }
    sivhex() { tr -dc a-f0-9 ; } # clean hashes of non-hex chars
    sivb62() { tr -dc A-Za-z0-9 ; }
    smoosh() { xz -q -F raw ; }
    unmash() { xz -d -q -F raw ; }
    bzoosh() { bzip2 -q ; } # better small file compression on single core
    b64toz() { tr '=' '@' | tr '+' '#' | tr '/' '$' ; }
    ztob64() { tr '@' '=' | tr '#' '+' | tr '$' '/' ; }
    fmtmsg() { fold -w 13 | tr '\n' ' ' | fold -w 71 ; }

    # chain hash stream without for loops
    beesum() { b2sum ; }
    onesum() { beesum | sivhex ; }
    trisum() { onesum | onesum | onesum ; }
    ninsum() { trisum | trisum | trisum ; }
    bigsum() { ninsum | ninsum | ninsum ; } # chain hash 81x to resist search

    # global hash stream
    nexsum() { hash=$(echo -n $hash | trisum) ; }

    # generate NNTP Message-ID
    gen_msgid() { # mast pass global to this function
    # generate base62 message-id to identify either message or file
    # communicants can use a custom secret keyid here for out-of band security keyid="$msgid" # newscard.default.keyid (change for secret networks) msgid="$keyid$msgid$keyid" # never change this!
    # any change in this method will regress fetch of all prior newscards
    # this must be done before forking the hash stream with big salt
    msgid=$(echo -n "$msgid$msgid$msgid" | bigsum) # clone expand msgid msgid=$(echo -n $msgid | xxd -p -r | base64 -w 0 | sivb62 | tail -c 43) subid=$msgid # for the NNTP subject header
    msgid="<$msgid@news.card>"
    }

    # read the user-supplied passphrase and save for later naming and decryption get_pass_hash() {
    hash="$passphrase"
    }

    # superencryption routine using 9 keys and 9 salts.
    generate_credentials() {
    # declare some sets
    iter=() ; salt=() ; hashphrase=()

    # get encryption params for bigsalt before we salt and fork the hash stream nexsum ; salt[0]=${hash:0:16}
    nexsum ; hashphrase[0]=$hash
    nexsum
    inum=${hash:0:3}
    inum=$(printf '%d' 0x$inum)
    inum=$((10#$inum))
    iter[0]=$((16384+inum))

    # SALT MODES : if mode generate mix random big salt only in encrypt mode
    [[ "$mode" == 'enc' ]] && bigsalt=$(head -c 1023 /dev/urandom | xxd -p | fold -w 1 | shuf -n 1023 | sivhex | trisum)
    [[ "$mode" == 'tuff' ]] && bigsalt=$(head -c 64 /dev/urandom | xxd -p -c 0 | tr -dc a-f0-9) # careful not to advance keygen
    [[ "$mode" == 'dec' ]] && dec_salt
    [[ "$mode" == 'show' ]] && dec_salt

    # combine random salt with passphrase
    hash="$hash$bigsalt"

    # encrypt the salt for the output message
    # derive pseudorandom cipher iterations
    for x in {1..9}
    do
    nexsum
    inum=${hash:0:3}
    inum=$(printf '%d' 0x$inum)

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Byrl Raze Buckbriar on Sun Feb 9 11:09:35 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Byrl Raze Buckbriar wrote:

    * NEWSCARD * Publish and fetch permanent named records via Network News

    Newscard creates a decentralized, named record pastebin.

    [git repo] https://codeberg.org/OCTADE/newscard

    * NEWSCARD VERSION 0.0.1.D *

    Nice!

    However, I do not have a code folder in $HOME and always get this
    error message:

    Newscard config not found at '/home/code/.newscard'. Creating config now.

    Secondly, I have to use for each posting a different password, which
    I do not want to do.

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Byrl Raze Buckbriar@21:1/5 to Stefan Claas on Sun Feb 9 06:15:26 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    The git repo now has a bug fix commit:
    https://codeberg.org/OCTADE/newscard.

    On Sun, 9 Feb 2025 11:09:35 +0100
    Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:

    Byrl Raze Buckbriar wrote:

    * NEWSCARD * Publish and fetch permanent named records via Network News

    Newscard creates a decentralized, named record pastebin.

    [git repo] https://codeberg.org/OCTADE/newscard

    * NEWSCARD VERSION 0.0.1.D *

    Nice!

    I'm glad you tested it and found the first bug. I see a really dumb bug that I left in there: a hard-coded path without the global whoami variable required!

    However, I do not have a code folder in $HOME and always get this
    error message:

    Newscard config not found at '/home/code/.newscard'. Creating config now.

    That should be fixed. I just committed it to the git repo. I left a hard-coded path in one of the functions. I inserted the whoami variable and placed it as a global declaration. Let me know if that fixes it for your setup.

    Secondly, I have to use for each posting a different password, which
    I do not want to do.

    This is mandatory, and is the entire point of the scheme. It is a unique, NAMED record. You publish the record with the unique key. Then anyone else you reveal the key to can pull the record. If you use a large, random key, the record cannot be decrypted
    by anyone without that knowledge. If you reveal the key, anyone can fetch and decrypt the record.

    I initially conceived the scheme as a way of having a large signature without including it in news articles. Instead the signature line would have just the newscard key. Then anyone could pull it and see the encrypted file decoded to plaintext. As an
    example, try to pull newscard 'octade'.

    The key or passphrase is run through a chain hash stream to generate the message-id That will be used in the NNTP article, which is how the record is retrieved. Every NNTP server I have ever tested honors this convention. I have zombie code placeholders
    for the eventuality of that yowie. Then I will implement a check to ensure the NNTP server has stored the article with the given message-id.


    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Byrl Raze Buckbriar on Sun Feb 9 13:43:12 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Byrl Raze Buckbriar wrote:

    The git repo now has a bug fix commit:
    https://codeberg.org/OCTADE/newscard.

    Thanks!

    Secondly, I have to use for each posting a different password, which
    I do not want to do.

    This is mandatory, and is the entire point of the scheme. It is a unique, NAMED record. You publish the record with the unique key. Then anyone else you reveal the key to can pull the record. If you use a large, random key, the record cannot be
    decrypted by anyone without that knowledge. If you reveal the key, anyone can fetch and decrypt the record.

    I initially conceived the scheme as a way of having a large signature without including it in news articles. Instead the signature line would have just the newscard key. Then anyone could pull it and see the encrypted file decoded to plaintext. As an
    example, try to pull newscard 'octade'.

    The key or passphrase is run through a chain hash stream to generate the message-id That will be used in the NNTP article, which is how the record is retrieved. Every NNTP server I have ever tested honors this convention. I have zombie code
    placeholders for the eventuality of that yowie. Then I will implement a check to ensure the NNTP server has stored the article with the given message-id.

    Ok. I can fix this by using my nora program, which generates deterministic nonces, which can be used as passwords, so that Alice and Bob can generate
    for each day a lot of them and they don't need to exchange them, while
    using a share secret.

    https://github.com/706f6c6c7578/nora

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Stefan Claas on Sun Feb 9 14:25:12 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Stefan Claas wrote:

    Ok. I can fix this by using my nora program, which generates deterministic nonces, which can be used as passwords, so that Alice and Bob can generate for each day a lot of them and they don't need to exchange them, while
    using a share secret.

    https://github.com/706f6c6c7578/nora

    $ nano message.txt

    $ nora -p Usenet -salt Test -n 20
    1: 982cfe73d06969cc453fec81d4baf63a 20250209
    2: 425151c8784ccdae2ab6336b569de6e6 20250209
    3: 7b4b41ccafc5903c22d38e18703a2a84 20250209
    4: d69842f36c2615631714cd3ea8ed7cf5 20250209
    5: 814d5434902dcf68162bf27f144fac16 20250209
    6: a4e5448e70e7f69df3fbdacc003d6b4c 20250209
    7: 6907db429efe461234f698c2000c36dc 20250209
    8: 4aace268c316d7ba4cc1d11920ee5c4f 20250209
    9: 97e4edde180a0fccc63ca6d665d1b9fe 20250209
    10: ae15edefbd587f7e97f0821649f0b5e2 20250209
    11: 4834a486dd383afd34363330781cab3e 20250209
    12: 284a5966e3b3bab06e37d2869572f009 20250209
    13: 5f3f280363ccdce3cfcbbeccbdf5ce37 20250209
    14: 727232cfecf1644388d5d8445d3e6709 20250209
    15: 0289a4bd5998ee03965cad3f097bb037 20250209
    16: aacdb48b4a160272483ffe4eb67d771a 20250209
    17: ea0dfc26e62c02f4f711c388a2c242f3 20250209
    18: 99879b97d212ddc78ff41fac79510d15 20250209
    19: 67842f85c50223c4d2adc336dbdcfeba 20250209
    20: e0c098a3c221bed82899227d6dc0fa2b 20250209

    $ card enc 982cfe73d06969cc453fec81d4baf63a message.txt
    Created newscard : 982cfe73d06969cc453fec81d4baf63a : article in draft folder. Use 'put' to publish.

    $ card put 982cfe73d06969cc453fec81d4baf63a

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Byrl Raze Buckbriar@21:1/5 to Stefan Claas on Sun Feb 9 08:16:20 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    On Sun, 9 Feb 2025 13:43:12 +0100
    Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:

    Byrl Raze Buckbriar wrote:

    The git repo now has a bug fix commit: https://codeberg.org/OCTADE/newscard.

    Thanks!

    Secondly, I have to use for each posting a different password, which
    I do not want to do.

    This is mandatory, and is the entire point of the scheme. It is a unique, NAMED record. You publish the record with the unique key. Then anyone else you reveal the key to can pull the record. If you use a large, random key, the record cannot be
    decrypted by anyone without that knowledge. If you reveal the key, anyone can fetch and decrypt the record.

    I initially conceived the scheme as a way of having a large signature without including it in news articles. Instead the signature line would have just the newscard key. Then anyone could pull it and see the encrypted file decoded to plaintext. As an
    example, try to pull newscard 'octade'.

    The key or passphrase is run through a chain hash stream to generate the message-id That will be used in the NNTP article, which is how the record is retrieved. Every NNTP server I have ever tested honors this convention. I have zombie code
    placeholders for the eventuality of that yowie. Then I will implement a check to ensure the NNTP server has stored the article with the given message-id.

    Ok. I can fix this by using my nora program, which generates deterministic nonces, which can be used as passwords, so that Alice and Bob can generate for each day a lot of them and they don't need to exchange them, while
    using a share secret.

    https://github.com/706f6c6c7578/nora

    I know what you are saying. I would use a hash function to hash a shared secret with a nonce appended or prepended, or both. Then one can send the nonce along with the message, encrypted with the nonced shared key. Newscard actually does something like
    this by generating a random salt and encrypting the random salt with the Newscard derived key. That salt is the first string of encoded payload characters between the asterisks. The salt is decrypted and used to reproduce the secret key stream, so that
    the same message will form a radically different ciphertext even if the same passphrase is used. Plus it also genrates 9 salts for use with openssl encryption. Each message is encrypted with 9 hash-based keys, 9 salts, and 9 randomly-chosen key
    derivation iteration counts for the chacha20 cipher. I designed it to be a beast with serious overkill for the fun of it. I really like chacha20 for this kind of stuff.

    I would like to add some functions to do what you are suggesting (shared key scheduling), allowing in-app shared key management ... but not this month. I need to wait until some more of the bugs are found in this doodleware before I risk creating more
    bugs. Stress test it all you like and try to break things if you will.

    You might also try to post some test messages using tuff mode and reveal the keys publicly, so others can try to 'get' and 'show' them, and see if they encounter any bugs on their individual platforms or distros. The 'tuff' keygen in the script is very
    much overkill, too. When it generates a random key, it makes sure it is gangbusters bonzo bonkers random.

    I wonder if it is possible to craft a encrypted message that will decrypt as a shell bomb, exploiting the shell or grabbing an unauthorized path in the script. I think that 'less' in standard terminals is pretty secure against such stuff, but someone
    might find a way to hack into a file path before it gets piped to less. That is not my area of expertise so any suggestions or breaks would be appreciated.

    This project has taught me that BASH can be like weepy dynamite if not handled very carefully. Yet it is just too convenient with all the GNU userland tools and crypto toys to abandon BASH for a low-level language. Hello, foot gun ... meet knee gun.


    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Byrl Raze Buckbriar on Sun Feb 9 15:38:39 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Byrl Raze Buckbriar wrote:

    You might also try to post some test messages using tuff mode and reveal the keys publicly, so others can try to 'get' and 'show' them, and see if they encounter any bugs on their individual platforms or distros. The 'tuff' keygen in the script is very
    much overkill, too. When it generates a random key, it makes sure it is gangbusters bonzo bonkers random.

    Will do.

    I wonder if it is possible to craft a encrypted message that will decrypt as a shell bomb, exploiting the shell or grabbing an unauthorized path in the script. I think that 'less' in standard terminals is pretty secure against such stuff, but someone
    might find a way to hack into a file path before it gets piped to less. That is not my area of expertise so any suggestions or breaks would be appreciated.

    I know shell bombs, but they have to been executet in bash directly IIRC,
    not sure if they would work with NEWSCARD, but I do not try it out.

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Byrl Raze Buckbriar on Sun Feb 9 15:41:34 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Byrl Raze Buckbriar wrote:

    I'm glad you tested it and found the first bug. I see a really dumb bug that I left in there: a hard-coded path without the global whoami variable required!

    Why must the passwords been saved in draft and queue folders, as it
    happen to me? The sent folder is always empty. Maybe a card del
    would be nice to delete folder content.

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Byrl Raze Buckbriar@21:1/5 to Stefan Claas on Sun Feb 9 08:41:38 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    On Sun, 9 Feb 2025 14:25:12 +0100
    Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:

    Stefan Claas wrote:

    Ok. I can fix this by using my nora program, which generates deterministic nonces, which can be used as passwords, so that Alice and Bob can generate for each day a lot of them and they don't need to exchange them, while using a share secret.

    https://github.com/706f6c6c7578/nora

    $ nano message.txt

    $ nora -p Usenet -salt Test -n 20
    1: 982cfe73d06969cc453fec81d4baf63a 20250209
    2: 425151c8784ccdae2ab6336b569de6e6 20250209
    3: 7b4b41ccafc5903c22d38e18703a2a84 20250209
    4: d69842f36c2615631714cd3ea8ed7cf5 20250209
    5: 814d5434902dcf68162bf27f144fac16 20250209
    6: a4e5448e70e7f69df3fbdacc003d6b4c 20250209
    7: 6907db429efe461234f698c2000c36dc 20250209
    8: 4aace268c316d7ba4cc1d11920ee5c4f 20250209
    9: 97e4edde180a0fccc63ca6d665d1b9fe 20250209
    10: ae15edefbd587f7e97f0821649f0b5e2 20250209
    11: 4834a486dd383afd34363330781cab3e 20250209
    12: 284a5966e3b3bab06e37d2869572f009 20250209
    13: 5f3f280363ccdce3cfcbbeccbdf5ce37 20250209
    14: 727232cfecf1644388d5d8445d3e6709 20250209
    15: 0289a4bd5998ee03965cad3f097bb037 20250209
    16: aacdb48b4a160272483ffe4eb67d771a 20250209
    17: ea0dfc26e62c02f4f711c388a2c242f3 20250209
    18: 99879b97d212ddc78ff41fac79510d15 20250209
    19: 67842f85c50223c4d2adc336dbdcfeba 20250209
    20: e0c098a3c221bed82899227d6dc0fa2b 20250209

    $ card enc 982cfe73d06969cc453fec81d4baf63a message.txt
    Created newscard : 982cfe73d06969cc453fec81d4baf63a : article in draft folder. Use 'put' to publish.

    $ card put 982cfe73d06969cc453fec81d4baf63a

    I was able to retrieve it. I'm surprised it worked on your end without further bugs. Hijack hacking ...

    Did you already have all the dependencies installed? If not, which dependencies were you required to install to get the newscard script to work?


    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Byrl Raze Buckbriar on Sun Feb 9 15:53:29 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Byrl Raze Buckbriar wrote:
    On Sun, 9 Feb 2025 14:25:12 +0100
    Stefan Claas <fgrsna.pynnf@vagrearg.eh> wrote:

    Stefan Claas wrote:

    Ok. I can fix this by using my nora program, which generates deterministic
    nonces, which can be used as passwords, so that Alice and Bob can generate
    for each day a lot of them and they don't need to exchange them, while using a share secret.

    https://github.com/706f6c6c7578/nora

    $ nano message.txt

    $ nora -p Usenet -salt Test -n 20
    1: 982cfe73d06969cc453fec81d4baf63a 20250209
    2: 425151c8784ccdae2ab6336b569de6e6 20250209
    3: 7b4b41ccafc5903c22d38e18703a2a84 20250209
    4: d69842f36c2615631714cd3ea8ed7cf5 20250209
    5: 814d5434902dcf68162bf27f144fac16 20250209
    6: a4e5448e70e7f69df3fbdacc003d6b4c 20250209
    7: 6907db429efe461234f698c2000c36dc 20250209
    8: 4aace268c316d7ba4cc1d11920ee5c4f 20250209
    9: 97e4edde180a0fccc63ca6d665d1b9fe 20250209
    10: ae15edefbd587f7e97f0821649f0b5e2 20250209
    11: 4834a486dd383afd34363330781cab3e 20250209
    12: 284a5966e3b3bab06e37d2869572f009 20250209
    13: 5f3f280363ccdce3cfcbbeccbdf5ce37 20250209
    14: 727232cfecf1644388d5d8445d3e6709 20250209
    15: 0289a4bd5998ee03965cad3f097bb037 20250209
    16: aacdb48b4a160272483ffe4eb67d771a 20250209
    17: ea0dfc26e62c02f4f711c388a2c242f3 20250209
    18: 99879b97d212ddc78ff41fac79510d15 20250209
    19: 67842f85c50223c4d2adc336dbdcfeba 20250209
    20: e0c098a3c221bed82899227d6dc0fa2b 20250209

    $ card enc 982cfe73d06969cc453fec81d4baf63a message.txt
    Created newscard : 982cfe73d06969cc453fec81d4baf63a : article in draft folder. Use 'put' to publish.

    $ card put 982cfe73d06969cc453fec81d4baf63a

    I was able to retrieve it. I'm surprised it worked on your end without further bugs. Hijack hacking ...

    Did you already have all the dependencies installed? If not, which dependencies were you required to install to get the newscard script to work?

    I only had to install netcat and after that it worked out of the box.

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Stefan Claas on Sun Feb 9 15:57:53 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Stefan Claas wrote:

    I only had to install netcat and after that it worked out of the box.

    BTW.

    $ card tuff m.txt
    $ card put xsVD78DPVfJA7Q4OvwfJ3V1Q9cglC6dkxswsnWUgzo7

    (Message created with silkcode and should show chinese characters)

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Byrl Raze Buckbriar@21:1/5 to All on Mon Feb 10 05:16:43 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    I have a HackerNews profile. I started a thread for newscard. Is anyone else here on HN?

    [HN link] https://news.ycombinator.com/item?id=42998873

    It might be useful to call attention to the fact that Usenet still exists.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stefan Claas@21:1/5 to Byrl Raze Buckbriar on Mon Feb 10 20:55:57 2025
    XPost: alt.cypherpunks, alt.privacy.anon-server

    Byrl Raze Buckbriar wrote:

    I know what you are saying. I would use a hash function to hash a shared secret with a nonce appended or prepended, or both.

    For easy usage we could use as password a hsub or esub, which are unique
    for each session. :-)

    https://github.com/crooks/hsubgen
    https://github.com/706f6c6c7578/esub

    Regards
    Stefan

    --
    Onion Courier Home Server Mon-Fri 15:00-21:00 UTC Sat-Sun 11:00-21:00 UTC ohpmsq5ypuw5nagt2jidfyq72jvgw3fdvq37txhnm5rfbhwuosftzuyd.onion:8080 inbox
    age1yubikey1qv5z678j0apqhd4ng7p22g4da8vxy3q5uvthg6su76yj0y8v7wp5kvhstum

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)