<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Cryptography on mkz.me</title>
		<link>https://mkz.me/til/cryptography/</link>
		<description>Recent content in Cryptography on mkz.me</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Wed, 02 Oct 2024 11:53:06 +0200</lastBuildDate>
		
			<atom:link href="https://mkz.me/til/cryptography/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Basic RSA with python</title>
				<link>https://mkz.me/til/cryptography/basic-rsa-with-python/</link>
				<pubDate>Wed, 02 Oct 2024 11:53:06 +0200</pubDate>
				<guid>https://mkz.me/til/cryptography/basic-rsa-with-python/</guid>
				<description>&lt;p&gt;RSA (Rivest-Shamir-Adleman) is a public-key cryptosystem widely used for secure data transmission.&#xA;It works by computing 2 large primes, and using the factor of those two as a public key.&lt;/p&gt;&#xA;&lt;p&gt;The algorithm is as simple as:&lt;/p&gt;&#xA;&lt;p&gt;Key generation:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Choose/compute 2 large primes, p &amp;amp; q&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Calculate the factor of those 2: n = p * q&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Compute φ(n) = (p-1) * (q-1)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Choose a public exponent e, that is coprime to φ(n) (usually 3, 5, 17, 257, or 65537)&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
