SlideShare a Scribd company logo
1 of 32
One time password
Mahdi Ataeyan
Website: www.ataeyan.com
Twitter: @kalpase
Please feel free to interrupt 
me if you have questions!
 Methods for authenticating people
● What you know (password)
● what you have (smart card)
● what you are (biometric sensors)
● Cracked
● Stolen
● Guessed
● Lost
● difficult to manage or unmanageable
static password
What is otp?
Why?
● Cracked
● Stolen
● Guessed
● Lost
● manageable
bottleneck
Methods of generating the OTP
● Time­synchronized 
● Mathematical algorithms
➢ based on the previous password
➢ based on a challenge
in other word
● Time­based authentication
● Event­based authentication
● Challenge­response­based  authentication
based on the previous password
● s = seed
● f(s) = hash function
● f(f(f( .... f(s) .…)))
● f1000
(s) is stored on the target system
● p = f999
(s)      # user's first login password
● f(p) = f1000
(s) #server can authenticate password
● The value stored in target replaced by p.
●  p = f998
(s)    #next login
● f(p) = f999
(s) #server can authenticate password
based on a challenge
● non­cryptographic protocols
➢Password
➢CAPTCHAs
➢copy protection challenges.
• Cryptographic techniques
➢Message authentication code
Challenge–response authentication
●     Server sends a unique challenge value sc to the client
●     Client generates unique challenge value cc
●     Client computes cr = hash(cc + sc + secret)
●     Client sends cr and cc to the server
●     Server calculates the expected value of cr and ensures the client 
responded correctly
●     Server computes sr = hash(sc + cc + secret)
●     Server sends sr
●     Client calculates the expected value of sr and ensures the server 
responded correctly
Examples of  challenge­response 
algorithms
● zero­knowledge password proof and key agreement systems 
(such as Secure Remote Password (SRP))
● Challenge­Handshake Authentication Protocol (CHAP)
● OCRA ­ OATH Challenge­Response Algorithm
● Salted Challenge Response Authentication Mechanism 
(SCRAM)
● ssh's challenge­response system based on RSA
Message authentication code
● hash function
➢ MD5      #HMAC­MD5 
➢ SHA­1   #HMAC­SHA1
● IPsec and TLS protocols are used HMAC­SHA1 
and HMAC­MD5.
Hash­based message 
authentication code
● H is a cryptographic hash function,
● K is a secret key padded to the right with extra zeroes to the 
input block size of the hash function, or the hash of the 
original key if it is longer than that block size,
● m is the message
●     opad is the outer padding (0x5c5c5c…5c5c, one­block­
long hexadecimal constant),
●     and ipad is the inner padding (0x363636…3636, one­
block­long hexadecimal constant). 
HMAC­based One­time Password 
Algorithm
● HOTP­Value = HOTP(K,C) mod 10d   
#number of digits
● HOTP(K,C) = Truncate(HMAC(K,C)) & 0x7FFFFFFF
● HMAC(K,C) = SHA1(K   0x5c5c…   SHA1(K   0x3636…   C))⊕ ∥ ⊕ ∥
● K =  secret key
● C =  counter
● Truncate = a function that selects 4 bytes from the result of the 
HMAC in a defined manner.
Time­based One­time Password 
Algorithm
● TC = (unixtime(now) ­ unixtime(T0)) / TS
– T0 = start of an epochand 
– TS = counting in units of a time step
● TOTP = HOTP(SecretKey, TC)
● TOTP­Value = TOTP mod 10d #
d = number of 
digits
Methods of delivering
● Text messaging
● Mobile phones
● Proprietary tokens
● Web­based methods
● Hardcopy
Text messaging
Mobile phones
Proprietary tokens
Web­based methods
Hardcopy (TAN)
Transaction authentication number 
(TAN)
● Classic TAN
● Indexed TAN (iTAN)
● Indexed TAN with CAPTCHA (iTANplus)
● Mobile TAN (mTAN)
● pushTAN
Two­factor authentication
Multi­factor authentication
Authentication­as­a­service
● Automates everything
● Protects everything
● Protects everyone
● Easy migration
● Saves money
One Time Password

More Related Content

More from mahdi ataeyan (7)

دفترکل توزیع شده
دفترکل توزیع شدهدفترکل توزیع شده
دفترکل توزیع شده
 
Blockchanes
BlockchanesBlockchanes
Blockchanes
 
Yacy search engine
Yacy search engineYacy search engine
Yacy search engine
 
high availability And File hosting service (OwnCloud)
high availability And File hosting service (OwnCloud)high availability And File hosting service (OwnCloud)
high availability And File hosting service (OwnCloud)
 
Xmpp
XmppXmpp
Xmpp
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Onion network architecture
Onion network architectureOnion network architecture
Onion network architecture
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
JavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate GuideJavaScript Usage Statistics 2024 - The Ultimate Guide
JavaScript Usage Statistics 2024 - The Ultimate Guide
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 

One Time Password

Editor's Notes

  1. hash chain S/KEY
  2. sc is the server generated challenge cc is the client generated challenge cr is the client response sr is the server response
  3. a short piece of information used to authenticate a message To provide integrity and authenticity assurances on the message
  4. The mask sets the most significant bit to 0, to prevent the number from being interpreted as negative. This guards against different implementations of the modulo operation by processors.[2]
  5. What you know => user name and password What you have => one time password token
  6. What you know => user name and password What you have => one time password token What you are