taler-xotp

xOTP generator
Log | Files | Refs | Submodules | README

commit 98f784c5e9e06810c137619f743d65978eeb3635
parent 92677c0867f3501f5a165566f23c2de3193adf9b
Author: Adrian STEINER <adrian.steiner@bfh.ch>
Date:   Thu, 15 Jan 2026 13:41:17 +0100

Add parser page, update new liveview and auto build, relink parser repo

Diffstat:
A.vscode/tasks.json | 17+++++++++++++++++
MMakefile | 21+++++++++++++--------
Mbootstrap | 0
Mrequirements.txt | 1+
Msource/_static/baseX_converter/Makefile | 7+++++--
Msource/_static/baseX_converter/base32.wasm | 0
Msource/_static/baseX_converter/base8.wasm | 0
Asource/_templates/.icons/xOTP_icon.svg | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Msource/conf.py | 9+++++++--
Msource/index.rst | 29++++++++++++++++++++++-------
10 files changed, 169 insertions(+), 19 deletions(-)

diff --git a/.vscode/tasks.json b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "type": "shell", + "command": "make html", + "linux": "make html", + "windows": "make.bat html", + "group": { + "isDefault": true, + "kind": "build" + } + } + ] +} +\ No newline at end of file diff --git a/Makefile b/Makefile @@ -5,14 +5,13 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build +SOURCEDIR := source +BUILDDIR := build #Own Settings PORT ?= 2000 -ADDRESS ?= 0.0.0.0 -BROWSER ?= xdg-open - +HOST ?= 0.0.0.0 +BROWSER ?= xdg-open # Put it first so that "make" without argument is like "make help". help: @@ -28,5 +27,12 @@ help: installRequirements: pip install -r requirements.txt -localView: - $(BROWSER) http://$(ADDRESS):$(PORT)/index.html && python3 -m http.server -d $(BUILDDIR)/html -b $(ADDRESS) $(PORT) -\ No newline at end of file + +livehtml: + @echo "Start sphinx-autobuild at http://$(HOST):$(PORT)" + @trap 'kill $$PID' INT; \ + sphinx-autobuild $(SOURCEDIR) $(BUILDDIR)/html --host $(HOST) --port $(PORT) & \ + PID=$$!; \ + sleep 1; \ + xdg-open http://$(HOST):$(PORT); \ + wait $$PID diff --git a/bootstrap b/bootstrap diff --git a/requirements.txt b/requirements.txt @@ -1,6 +1,7 @@ Sphinx==8.1.3 sphinx_immaterial==0.12.4 sphinxcontrib-video==0.2.1 +sphinx-autobuild sphinx-immaterial[keys] git+https://github.com/steinerAdi/sphinx-embedPDF.git myst-parser \ No newline at end of file diff --git a/source/_static/baseX_converter/Makefile b/source/_static/baseX_converter/Makefile @@ -2,12 +2,15 @@ .PHONY: build +LIB_PATH := ../../../taler-xotp_fw/third_party/baseX-Converter/ +INC := $(LIB_PATH)/inc + build: - emcc baseX-Converter/lib/base8_converter.c -o base8.js \ + emcc $(LIB_PATH)/src/base8_converter.c -I$(INC) -o base8.js \ -s EXPORTED_FUNCTIONS="['_base8_encodeBytes', '_base8_stringToNum', '_base8_decodeNum', '_malloc', '_free']" \ -s EXPORTED_RUNTIME_METHODS="['cwrap', 'allocate', 'allocateUTF8', 'intArrayFromString', 'UTF8ToString']" \ -s MODULARIZE=1 -s ALLOW_MEMORY_GROWTH=1 -s EXPORT_NAME="Base8Module" - emcc baseX-Converter/lib/base32_converter.c -o base32.js \ + emcc $(LIB_PATH)/src/base32_converter.c -I$(INC) -o base32.js \ -s EXPORTED_FUNCTIONS="['_base32_decodeString', '_base32_encodeBytes', '_malloc', '_free']" \ -s EXPORTED_RUNTIME_METHODS="['cwrap', 'allocate', 'allocateUTF8', 'intArrayFromString', 'UTF8ToString']" \ -s MODULARIZE=1 -s ALLOW_MEMORY_GROWTH=1 -s EXPORT_NAME="Base32Module" diff --git a/source/_static/baseX_converter/base32.wasm b/source/_static/baseX_converter/base32.wasm Binary files differ. diff --git a/source/_static/baseX_converter/base8.wasm b/source/_static/baseX_converter/base8.wasm Binary files differ. diff --git a/source/_templates/.icons/xOTP_icon.svg b/source/_templates/.icons/xOTP_icon.svg @@ -0,0 +1,104 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + width="159.93701" + height="153.76527" + viewBox="0 0 47.981103 46.129582" + version="1.1" + id="svg4" + sodipodi:docname="test.svg" + inkscape:version="1.4.3 (1:1.4.3+202512261035+0d15f75042)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs + id="defs4" /> + <sodipodi:namedview + id="namedview4" + pagecolor="#505050" + bordercolor="#ffffff" + borderopacity="1" + inkscape:showpageshadow="0" + inkscape:pageopacity="0" + inkscape:pagecheckerboard="1" + inkscape:deskcolor="#d1d1d1" + inkscape:zoom="4.3104774" + inkscape:cx="87.461311" + inkscape:cy="17.515461" + inkscape:window-width="1720" + inkscape:window-height="1403" + inkscape:window-x="20" + inkscape:window-y="20" + inkscape:window-maximized="0" + inkscape:current-layer="svg4" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6;stroke-linecap:square;stroke-opacity:1;paint-order:markers stroke fill" + id="rect6" + width="37.5" + height="28.5" + x="3" + y="14.629583" + rx="3" + ry="3" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:3;stroke-linecap:square;stroke-opacity:1;paint-order:markers stroke fill" + id="rect7" + width="10.5" + height="6" + x="35.981102" + y="25.879583" + rx="3" + ry="3" /> + <circle + cx="39.121101" + cy="28.879583" + fill="#000000" + id="circle6" + style="stroke-width:0.3" + r="1.5" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:6;stroke-linecap:square;stroke-opacity:1;paint-order:markers stroke fill" + id="rect8" + width="37.5" + height="6" + x="3" + y="14.629583" + rx="3" + ry="3" /> + <g + id="g13" + transform="matrix(0.3,0,0,0.3,-8.8019113,0)"> + <rect + style="fill:#000000;fill-opacity:1;stroke:#ffffff;stroke-width:10;stroke-linecap:square;stroke-opacity:1;paint-order:markers stroke fill" + id="rect10" + width="50" + height="45" + x="130.95349" + y="28.765282" + rx="5" + ry="5" /> + <rect + style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:5;stroke-linecap:square;stroke-opacity:1;paint-order:markers stroke fill" + id="rect11" + width="30" + height="60" + x="140.95349" + y="2.5" + rx="15" + ry="15" /> + <circle + cx="155.95349" + cy="42.34391" + r="5" + fill="#000000" + id="circle6-9" + style="fill:#ffffff;fill-opacity:1;stroke-width:1" /> + <rect + style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:5;stroke-linecap:square;stroke-opacity:1;paint-order:markers stroke fill" + id="rect12" + width="5" + height="15" + x="153.45349" + y="41.533638" /> + </g> +</svg> diff --git a/source/conf.py b/source/conf.py @@ -10,7 +10,7 @@ from datetime import datetime # Project configuration variables -project = "OTP Generator Online Manual" +project = "xOTP Generator Online Manual" author = "Adrian STEINER" copyright = str(datetime.now().year) + f", xOTP Generator, {author}" release = "0.0.1" @@ -197,6 +197,11 @@ html_theme_options = { # BEGIN: social icons "social": [ { + "icon": "xOTP_icon", + "link": "https://xotp.gitlab.io/website/", + "name": "xOTP Landing Page", + }, + { "icon": "bfh/dark", "link": "https://www.bfh.ch/ti", "name": "BFH-TI", @@ -210,7 +215,7 @@ html_theme_options = { "icon": "talerLogo", "link": "https://taler.net", "name": "GNU Taler", - }, + } ], # END: social icons } diff --git a/source/index.rst b/source/index.rst @@ -3,15 +3,30 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -xOTP Documentation documentation -================================ +xOTP Documentation +================== -Add your content using ``reStructuredText`` syntax. See the -`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_ -documentation for details. +In today's world of digital transactions, ensuring both security and privacy is critical. +While cash provides unmatched anonymity, its physical nature limits its use in mobile and remote contexts.GNU Taler addresses this challenge by offering a privacy-preserving digital payment system that remains tax-compliant and traceable. +However, its reliance on online connectivity creates limitations for offline scenarios. +This project introduces an embedded offline xOTP generator device that enables secure payment verification without internet access. +By leveraging synchronized clocks, cryptographic algorithms, and shared secrets, the device generates extended time-based one-time passcodes (xOTP) tied to transaction amounts. +These codes allow merchants to verify payments offline, maintaining security and usability. +Through iterative hardware and firmware development, the system evolved from a basic prototype to a refined solution featuring wireless charging, NFC-based configuration, and energy-efficient design. +Version 0.7.0 +------------- + +**TODO** + +Parser +------ + +A base8 and base32 parser to convert the currency or the secret in a base8 number string or vis-versa can be found at :doc:`baseXParser/index`. .. toctree:: - :maxdepth: 2 - :caption: Contents: + :hidden: + :caption: Parser + + baseXParser/index