Priti Tamang

Portfolio

Projects

Research and coursework in cryptography and mathematical modelling, from my thesis on hash-based signatures to group projects on payments, pollution, buses and stock prices.

Undergraduate thesis

Smaller Few-Time Signatures for Limited-Use SLH-DSA via Non-Uniform Bucket Thinning and Tree Removal

Undergraduate thesis · In progress · Supervised by Dr. Gokul KC

NIST's SLH-DSA is a quantum-safe signature standard, but its signatures are large: 7,856 bytes at 128-bit security. For keys that sign a limited number of messages, such as firmware or certificates, NIST's April 2026 draft brings that down to 3,856 bytes, and a June 2026 paper to 2,916. My thesis asks how much smaller they can get.

  1. Let the paper's sub-keys differ in size, where it gives them all the same size, and show the security proof still holds.
  2. Leave one part of the signature out by searching for a counter while signing, so it never has to be sent.
  3. Find the smallest secure settings for each of NIST's limited-use parameter sets, across its security levels and two hash functions, then build and measure the best 128-bit one.
Read more

The problem. Large signatures cost bandwidth, storage and certificate size. In NIST's limited-use sets, 2,400 of the 3,856 bytes (62%) belong to one component, the few-time signature that signs the message itself. That is the part worth shrinking.

What the paper does. The paper replaces one key signing every message with many independent sub-keys held in buckets. Each message picks one sub-key from each of several rows, so each sub-key is used only a small fraction of the time. That makes the scheme safer, and the extra safety margin is spent on making the sub-keys smaller. The result is 2,916 bytes, 24.4% below NIST's draft.

What it leaves open. The authors suggest two further savings: buckets of different sizes, and removing one part of the signature with a counter, an idea from an earlier scheme called SPHINCS+C. They give no construction for either.

What I will do. Extend the security proof to cover both changes, search for the smallest secure settings for each of NIST's limited-use parameter sets, and implement the best 128-bit one as a fork of the SPHINCS+ reference code, with test vectors.

Signature size, 128-bit security

7,856 bytes

SLH-DSA standard

  1. SLH-DSA standard: 7,856 bytes
  2. NIST draft, April 2026: 3,856 bytes (51% smaller)
  3. BPORS+FP paper, June 2026: 2,916 bytes (63% smaller than the standard, 24% smaller than the draft)
  4. My aim: below 2,916 bytes

The last three are for keys that sign up to 224 messages.

Python

Paper accepted

Matrix Encryption Walks

A lightweight cipher for low-resource devices: each byte is encrypted by a step across two secret key matrices. We reimplemented it in Python and extended it to three dimensions.

Python, Selenium

Paper accepted

Stock prices with GBM

Can geometric Brownian motion forecast prices on the Nepal Stock Exchange? We simulated 90-day price paths for three NEPSE stocks from a year of scraped data.

Python

Security of QR-based payments

A QR code stores data but cannot vouch for it. We studied how HMAC, digital signatures and one-time passwords secure QR payments, and tested replay protection. My part: the mathematics of HMAC.

Python

Air pollution modelling

A one-dimensional model of how pollutants like PM2.5 are carried and spread through the air. We found an exact solution, compared three numerical methods, and applied it near campus.

ESP32 with NEO-6M GPS, Python (FastAPI), MongoDB, Flutter

Campus bus tracking

A real-time tracker for Kathmandu University's buses: an ESP32 GPS unit, a FastAPI backend and a Flutter app with a live map and traffic-aware arrival times. I built the app and the mathematics.

Python

Paper accepted

Matrix Encryption Walks

A lightweight cipher for low-resource devices, where each byte is encrypted by taking a step across two secret key matrices. We reimplemented the cipher from the 2023 paper by Dunmore, Samandari and Jang-Jaccard in Python and re-ran its experiments, then extended it to three dimensions. Our paper on the extension was accepted at AMNS-2026.

The problem. Phones and sensors can't always afford heavy ciphers. MEW aims for fast encryption and a small key.

How it works. The key is two random matrices of bytes. Each byte of the message is combined with an entry of the first matrix. The result decides which direction to step and how far. The byte at the new position in the second matrix is then combined in to give the output. Two passes are made, with a reversal in between.

Python, Selenium

Paper accepted

Stock prices with GBM

Can geometric Brownian motion forecast the price of a stock on the Nepal Stock Exchange? We collected a year of daily closing prices for three NEPSE stocks (NIFRA, CGH and ANLB) with a Selenium scraper, estimated each stock's drift and volatility from the first nine months, and simulated future price paths over the next 90 days in Python. We worked on every part together, from studying the stochastic calculus to the implementation.

The problem. Stock prices are volatile and hard to forecast, and investors need some measure of the risk. Geometric Brownian motion (GBM) is a standard model in which the logarithm of the price follows a random walk with drift.

What we found. The mean forecast had a MAPE of 13.86% for NIFRA, 8.92% for CGH and 9.70% for ANLB, against our target of 10%. The confidence interval widened with the forecast horizon, as expected.

Python

Security of QR-based payments

A QR code only stores data; it says nothing about whether that data is genuine, unaltered or fresh. In a group project, we studied the mathematics of the tools that fix this in payments (HMAC, ECDSA digital signatures and time-based one-time passwords) and tested replay protection in Python. My part was the mathematics of HMAC: how it is built and why it is a secure authentication code.

The problem. QR codes were designed to store data compactly, not to secure it. A payment QR can be tampered with, forged, phished or replayed. A static code can be photographed or swapped, while a dynamic code is regenerated for each transaction.

What it shows. HMAC proves who sent a payment and that it wasn't altered, but not that it is fresh. TOTP adds freshness. ECDSA lets anyone verify a payment without sharing a secret, but only if nonces are generated correctly. A QR payment is only as secure as the cryptography around its payload, not the QR code itself.

Python

Air pollution modelling

A one-dimensional model of how a pollutant such as PM2.5 is carried and spread through the air, built on the advection-diffusion equation. We worked out an exact solution, compared three numerical methods against it, and applied the model to the distance from the Arniko Highway to the Kathmandu University campus.

The problem. Pollutants from traffic are carried by the wind and spread by diffusion. Exact solutions of the equation describing this exist only in simple cases, so numerical methods are used, and the question is how accurate and stable they are.

ESP32 with NEO-6M GPS, Python (FastAPI), MongoDB, Flutter

Campus bus tracking

A real-time tracker for Kathmandu University's buses. A GPS unit built on an ESP32 sends each bus's position to a FastAPI backend, and a Flutter app shows it live on a map with an estimated arrival time that accounts for traffic. My part was the mobile app frontend and the mathematics behind the system.

The problem. Campus buses arrive at unpredictable times, there was no way to see where a bus was, and no systematic way to tell passengers about delays. Students and staff waited at stops without knowing when the bus would come.

How it works. Three layers.

  1. A tracker on the bus, built from an ESP32 microcontroller and a NEO-6M GPS module, sends its position over Wi-Fi every 5 seconds.
  2. A FastAPI backend with a MongoDB database stores the positions, smooths GPS noise with a Kalman filter, estimates the arrival time using a traffic factor that depends on the time of day, and pushes updates to the app over WebSockets.
  3. A Flutter app shows the bus on an OpenStreetMap map, with its distance, speed, estimated arrival time and an indicator of how reliable the estimate is.