rajkesavan

I'm an undergrad at UC Berkeley interested in cryptography and logic, and I'm currently reading Michael Sipser's Theory of Computation. This page details a few of my projects and interests.

web rajk.me
mail rajk at berkeley dot edu
code github/raj-kesavan
public key 3B3ECEE1
dotfiles slashdot
Erdős number 5
resume pdf



ryujin is a classical cryptography and cryptanalysis Clojure library. ryujin currently supports Caesar, substititution, Hill, Vigènere, and one-time-pad ciphers. I also created and implemented an algorithm to probabilistically break substitution ciphers at a unicity distance of roughly 5000. [source] [details]
=> (encrypt (caesar 15) "hello world")
"spwwz hzcwo"
=> (decrypt (caesar 15) "spwwz hzcwo")
"hello world"

=> (def plain-text "Every mental state is irreducible: the mere fact of naming it - i.e., of classifying it - implies a falsification. From which it can be deduced that there are no sciences on Tlön, not even reasoning")
=> (def cipher-text (encrypt (caesar 23) plain-text))
=> (crack-caesar cipher-text)
=> ({:shift 23, :chi 0.024591684364994242, :guess "Every mental state is irreducible: the mere fact of naming it - i.e., of classifying it - implies a falsification. From which it can be deduced that there are no sciences on Tlön, not even reasoning"})

quetzal is an online, real-time, multiplayer adaptation of the classic game Snake - if you hit another player, you lose! When no one else is online, empty spots are taken by an AI. I wrote the backend in Clojure, which communicates to clients over WebSockets with http-kit. [source]
logicpod is a propositional logic Clojure library. logicpod parses (relatively) free-form input with instaparse, and can evaluate formulas given truth conditions, create truth tables, and check arguments for consistency and validity. [source]
=> (def wff-a (parse "(A & ((~B) <-> A))"))
[:and [:atom :A] [:iff [:not [:atom :B]] [:atom :A]]]

=> (def wff-b (parse "((not A) or B)"))
[:or [:not [:atom :A]] [:atom :B]]

; (valid? conclusion & givens)
=> (valid? wff-a wff-b)
false
=> (def wff-c (parse "B"))
=> (valid? wff-b wff-a wff-c)
true

busybeaver is a React.js implementation of an n-state Turing Machine that can be used to play the Busy Beaver game. The 2-state solution is a decent challenge. [source]
vigenere is a small, online implementation of a Vigenere cipher. [source]
selected literature
Italo Calvino If on a winter's night a traveler
Arundhati Roy The God of Small Things
Gabriel García Márquez One Hundred Years of Solitude
Kazuo Ishiguro Never Let Me Go
Jorge Luis Borges The Library of Babel
Haruki Murakami Hard-Boiled Wonderland and the End of the World
Umberto Eco The Name of the Rose
J.M. Coetzee Disgrace
David Mamet Glengarry Glen Ross