<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Math on Benjamin Italiaander</title><link>https://tlnd.org/math/</link><description>Recent content in Math on Benjamin Italiaander</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 28 Nov 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tlnd.org/math/index.xml" rel="self" type="application/rss+xml"/><item><title>How a TOTP Code Is Calculated</title><link>https://tlnd.org/math/totp_explained/</link><pubDate>Sat, 28 Nov 2026 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/totp_explained/</guid><description>&lt;h1 id="-how-a-totp-code-is-calculated"&gt;🔢 How a TOTP code is calculated&lt;/h1&gt;
&lt;p&gt;The six digits in your authenticator app (or on your &lt;a href="https://tlnd.org/Linux/yubikey/03_totp_oath/"&gt;YubiKey&lt;/a&gt;, or from &lt;a href="https://tlnd.org/Linux/bash_otp_generator/"&gt;oathtool in the terminal&lt;/a&gt;) are not random. They are calculated from two things: a &lt;strong&gt;shared secret&lt;/strong&gt; and &lt;strong&gt;the current time&lt;/strong&gt;. Your phone and the server both do the same calculation, so they get the same code without ever talking to each other.&lt;/p&gt;
&lt;p&gt;The recipe is open: &lt;strong&gt;HOTP&lt;/strong&gt; (&lt;a href="https://www.rfc-editor.org/rfc/rfc4226" class="external-link" target="_blank" rel="noopener"&gt;RFC 4226&lt;/a&gt;) and &lt;strong&gt;TOTP&lt;/strong&gt; (&lt;a href="https://www.rfc-editor.org/rfc/rfc6238" class="external-link" target="_blank" rel="noopener"&gt;RFC 6238&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>Key Derivation Function</title><link>https://tlnd.org/math/key_derivation_function/</link><pubDate>Fri, 28 Oct 2016 00:00:00 +0000</pubDate><guid>https://tlnd.org/math/key_derivation_function/</guid><description>&lt;h1 id="key-derivation-function-kdf"&gt;Key Derivation Function (KDF)&lt;/h1&gt;
&lt;h2 id="cryptographic-key-derivation"&gt;Cryptographic Key Derivation&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Cryptography | Key Management | Password Security&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A &lt;strong&gt;Key Derivation Function (KDF)&lt;/strong&gt; is a cryptographic algorithm used to derive one or more secret keys from an existing secret value.&lt;/p&gt;
&lt;p&gt;This original value may be a master key, password, passphrase, or another form of secret key material.&lt;/p&gt;
&lt;p&gt;KDFs are fundamental components of modern cryptographic systems and are widely used for encryption, authentication, password protection, and secure key management.&lt;/p&gt;</description></item></channel></rss>