One Time Password稱為一次性密碼, 也就是說你的密碼不需要記住. 以一個裝置來製造密碼, 而這密碼只能使用一次. 如此一來可以防止replay attack. 防止別人從中間劫取你的訊息然後送給伺服器. 但伺服器如何得知到底是誰送來的密碼? 如何辨識? client和server間如何同步?
有幾種方式
1. offline counter
client題供一個F function
F(counter)=OTP
OTP就是One Time Password
其中F每個Client都不一樣.
Server提供一個 對應G Function
G(OTP)=counter
因為counter會累計, 可由counter推算是不是replay的message
2. offline timer
client題供一個F function
F(timer)=OTP
OTP就是One Time Password
其中F每個Client都不一樣.
Server提供一個 G Function
G(OTP)=timer
當timer推算是不是replay的message
以上兩種方式的問題在於timer和counter必需要有一些容錯的計算.
但是可以off line方式產生OTP
3. online key exchange
K是使用者的密碼
Server提供一個Function F
F(K)=OTP
但OTP無法推回K
伺服器另外提供一個驗證的Function V
if OTP is true then V(OTP)=true
else OTP is false then V(OTP)=false
無論OTP是正確或是錯誤, 經過V Function後, OTP就消失了.
下次無法再使用相同的OTP作replay attack.
這種方式可以將密碼轉換成為一組OTP. 這種方式可以用於
一些認證轉移的機制上. 且OTP間不需要容錯.