Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WebAuthn で実現するパスワードレス認証 / nulab-sechack365

WebAuthn で実現するパスワードレス認証 / nulab-sechack365

2019年8月にヌーラボを訪れてくださった、SecHack 365 のみなさん向けにプレゼンした「WebAuthn で実現するパスワードレス認証」の資料です。

株式会社ヌーラボ

August 21, 2019
Tweet

More Decks by 株式会社ヌーラボ

Other Decks in Technology

Transcript

  1. 3

  2. 7

  3. FIDO U2F Google ͸શࣾһʹʮFIDO U2Fʯͷ࢖༻Λٛ຿෇͚ͨ FIDO U2F? Fast Identity Online

    = ૉૣ͍ΦϯϥΠϯೝূ Universal 2nd Factor = Ϣχόʔαϧͳ2ཁૉ ʢ໊લΛฉ͍ͯ΋Α͘Θ͔Βͳ͍ͱࢥͬͨʣ 2ཁૉೝূʹ෺ཧσόΠεΛ࢖༻͢Δ 1. ύεϫʔυೝূ = ஌ࣝͷཁૉ 2. ෺ཧσόΠε = ॴ༗ͷཁૉ ٛ຿Խ 8
  4. ೝূͷ3ཁૉ 1975೥ Computer Security Guidelines for Implementing the Privacy Act

    of 1974 (1) Something the person knows; (2) Something the person has; (3) Something the person is. 712೥ ݹࣄهʹొ৔͢Δࡾछͷਆث = has ॴ༗ͷཁૉ 2019೥ͷࢲͨͪ͸ͳͥ2ஈ֊ೝূ͕… FIPS 41 9
  5. 12

  6. ެ։伴҉߸Λ༻͍ͨνϟϨϯδϨεϙϯε 1976೥ Diffie ͱ Hellman ͕ެ։伴҉߸ԽͱೝূΛఏҊ 1977೥ Rivest, Shamir ͱ

    Adleman ͕ެ։伴҉߸ํࣜΛߏங 1985೥ Koblitz ͱ Miller ͕ପԁۂઢ҉߸ΛఏҊ RSA 2048 ϏοτΛ ECC 206 Ϗοτఔ౓Ͱ୲อ ૊ࠐΈ޲͚ = FIDO ͷೝূثͰ΋࢖༻ C ≡ (mod N) ME M ≡ (mod N) CD 13
  7. ೝূثΛ༻͍ͨൿີ伴ͷੜ੒ͱอޢ 1994೥ FIPS 140-1 2001೥ Security Requirements for Cryptographic Modules

    ଱λϯύੑ ϓϩʔϏϯά߈ܸ ϑΥʔϧτ߈ܸ αΠυνϟωϧ߈ܸ 2019೥9݄ FIPS 140-3 FIPS 140-2 17
  8. ͱ͸ Web Authentication: An API for accessing Public Key Credentials

    Level 1 ϒϥ΢βʹ࣮૷͞Εͨ 2 ͭͷ API ొ࿥ = navigator.credentials.create() ೝূ = navigator.credentials.get() ϒϥ΢βͱೝূث͕ձ࿩͢ΔͨΊͷ API ೝূث͔Β伴ϖΞΛੜ੒͢Δ ೝূث͔Βൿີ伴Ͱॺ໊Λੜ੒͢Δ WebAuthn 20
  9. ొ࿥ = navigator.credentials.create() Relying Party Server Authenticator challenge, user info,

    relying party info relying party id , user info, relying party info, clientDataHash new public key, credential id, attestation clientDataJSON, attestationObject 1 2 5 4 3 user verification, new keypair, attestation attestationObject Browser RP JavaScript Application 6 0 server validation AuthenticatorAttestationResponse PublicKeyCredentialCreationOptions 21
  10. ೝূ = navigator.credentials.get() Relying Party Server Authenticator challenge relying party

    id, clientDataHash authenticatorData signature clientDataJSON, authenticatorData, signature 1 2 5 4 3 user verification, create assertion Browser RP JavaScript Application 6 0 server validation AuthenticatorAssertionResponse PublicKeyCredentialRequestOptions WebAuthnAPI 22
  11. ·ͱΊ FIDO ͷجຊίϯηϓτ͕Θ͔ͬͨ ެ։伴҉߸Λ༻͍ͨνϟϨϯδϨεϙϯεೝূ Authenticator Λ༻͍ͨൿີ伴ͷੜ੒ͱอޢ origin ʹඥͮ͘ೝূ৘ใͷ؅ཧ ϩʔΧϧͰͷϢʔβʔݕূ WebAuthn

    ͸ϒϥ΢βʹ࣮૷͞Εͨ 2 ͭͷ API ొ࿥ navigator.credentials.create() ೝূ navigator.credentials.get() WebAuthn ͸ೝূثͱձ࿩͢ΔͨΊͷ API ύεϫʔυΛ࢖Θͣެ։伴ೝূج൫ͰϢʔβೝূͰ͖ͨ 23
  12. ࢀߟϊʔτ ຖ೔৽ฉ, ʮωοτόϯΫෆਖ਼઀ଓͰݱۚ࠮औɹ༰ٙͷେֶੜ ୁัɹ໊ݹ԰ʯ, IPA, ʰ৘ใηΩϡϦςΟനॻ2019ʱ, p.20, (August, 2019) σʔϏουɾαϯΨʔ,

    ʰੈքͷ೼ݖ͕ҰؾʹมΘΔ αΠόʔ ׬શฌثʱ, pp.207-224, pp.152-157, (May, 2019) Wikipedia, "Early AOL phishing," https://mainichi.jp/articles/20190817/k00/00m/040/033000c https://en.wikipedia.org/wiki/Phishing#Early_AOL_phishing 24
  13. ΪζϞʔυɾδϟύϯ, ʮGoogleࣾһͷϑΟογϯάΛ0ʹͨ͠෺ཧ Google, ʮTitan ηΩϡϦςΟ Ωʔʯ, FIDO, ʮFIDOΞϥΠΞϯεͷԊֵʯ, NIST, "Computer

    Security Guidelines for Implementing the Privacy A Richard E. Smithʰೝূٕज़ ύεϫʔυ͔Βެ։伴·Ͱʱ, p.399, p. security-keys.html https://cloud.google.com/titan https://fidoalliance.org/fido%e3%82%a2%e3%83%a9%e3%82%a4% lang=ja 25
  14. ൘૔੐உ, ֎઒੓෉, ʰωοτࣾձͱຊਓೝূ―ݪཧ͔ΒԠ༻· Ͱʱ, p.29, (July, 2010). ΋ͱ΄Μ΍, ʰWebAuthn ຊʱ,

    p.9, (Oct, 2018). ผ࡭೔ܦαΠΤϯεɼʮαΠόʔηΩϡϦςΟʔʯ, p.63, (April, 2016). 㟒ࢁҰஉ, ੁݪ݈, ཥཅ, ʰ҉߸ϋʔυ΢ΣΞͷηΩϡϦςΟʱ, p.39, pp.80-81, (June, 2019). 26
  15. NIST, "Security Requirements for Cryptographic Modules," Wikipedia, "FIPS 140-3", Yubico,

    "Key generation," Yubico, "FIDO2/WebAuthn Overview," W3C, "Web Authentication: An API for accessing Public Key Creden https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf https://en.wikipedia.org/wiki/FIPS_140-3 https://developers.yubico.com/U2F/Protocol_details/Key_generatio https://developers.yubico.com/WebAuthn/WebAuthn_Developer_G https://www.w3.org/TR/webauthn/ 27