FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Understanding RSA: A Simple Guide to Public-Key Math
How-ToTools

Understanding RSA: A Simple Guide to Public-Key Math

via Dev.toSanjay Ghosh1mo ago

RSA (Rivest–Shamir–Adleman) is a Public-Key cryptographic algorithm. It involves a public key to encrypt and corresponding private key to decrypt data to transmit securely and to verify digital signature. Step 1: Generate the key Take any 2 large prime numbers p and q Let n = p*q Find the totient of n (Totient of n means the count of the numbers which are less than n and each of the numbers are relatively prime to n. So, for example totient of 11 is 11 , because there are 11 numbers 1,2,3,4,5,6.7,8,9,10 , these are relatively prime to 11. Same way Totient of 12 is 4, because 1,5,7,11 , these 4 numbers are relatively prime to 12, and there is no common factor of 12 and any of these numbers. Easy way to find totient of p*q = (p-1)*(q-1)) ) Step 2: Do the math to encrypt/decrypt If your message is m and cypher is c , then c = m^e mod n -- This is encryption m = c^d mod n -- This is decryption Example Let p = 7 and q = 17 , so n = 7 x 17 = 119 The totient of n (119) = (p-1) (q-1) = (7-1) (

Continue reading on Dev.to

Opens in a new tab

Read Full Article
25 views

Related Articles

How-To

What I learned about X-HEEP by Benchmarking

Medium Programming • 10h ago

No more Chinese Polestar 3s as production shifts entirely to the US
How-To

No more Chinese Polestar 3s as production shifts entirely to the US

Ars Technica • 11h ago

How-To

The most important 40 mcq with its answers How to use Android visual studio to make a mobile app

Medium Programming • 11h ago

What is Agent Script? How to Build Agents with It in Agentforce
How-To

What is Agent Script? How to Build Agents with It in Agentforce

Medium Programming • 12h ago

I Coded 3 Famous Trading Strategies in Pine Script and Backtested All of Them. None Passed.
How-To

I Coded 3 Famous Trading Strategies in Pine Script and Backtested All of Them. None Passed.

Medium Programming • 12h ago

Discover More Articles