Lines Matching +full:sig +full:- +full:dir

3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
15 allow signing of data using the just-generated key. The data may be signed
17 easier to test using command-line tools.
23 <span id="error" style="color: #800; font-weight: bold; font-size: 150%;"></span>
35 <pre id="enrollresultjson" style="color: #008; font-family: monospace;"></pre>
37 <pre id="enrollresultraw" style="color: #008; font-family: monospace;"></pre>
39 <pre id="enrollresultattestobj" style="color: #008; font-family: monospace;"></pre>
41 <pre id="keyhandle" style="color: #008; font-family: monospace;"></pre>
43 <pre id="enrollresultauthdataraw" style="color: #008; font-family: monospace;"></pre>
45 <pre id="enrollresultauthdata" style="color: #008; font-family: monospace;"></pre>
47 <pre id="enrollresultpkblob" style="color: #008; font-family: monospace;"></pre>
49 <pre id="enrollresultpk" style="color: #008; font-family: monospace;"></pre>
51 <pre id="enrollresultprivkey" style="color: #008; font-family: monospace;"></pre>
56 <span id="asserterror" style="color: #800; font-weight: bold;"></span>
75 <pre id="assertresultjson" style="color: #008; font-family: monospace;"></pre>
77 <pre id="assertresultsigraw" style="color: #008; font-family: monospace;"></pre>
79 <pre id="assertresultauthdataraw" style="color: #008; font-family: monospace;"></pre>
81 <pre id="assertresultauthdata" style="color: #008; font-family: monospace;"></pre>
83 <pre id="assertresultsshsigraw" style="color: #008; font-family: monospace;"></pre>
85 <pre id="assertresultsshsigb64" style="color: #008; font-family: monospace;"></pre>
89 // ------------------------------------------------------------------
90 // a crappy CBOR decoder - 20200401 djm@openbsd.org
149 let r = -(this.decodeInteger(len) + 1)
160 let u8dec = new TextDecoder('utf-8')
241 // ------------------------------------------------------------------
242 // a crappy SSH message packer - 20200401 djm@openbsd.org
325 // ------------------------------------------------------------------
326 // webauthn to SSH glue - djm@openbsd.org 20200408
332 console.dir(arg)
384 authenticatorAttachment: "cross-platform",
387 pubKeyCredParams: [{alg: -7, type: "public-key"}], // ES256
390 console.dir(pkopts)
400 console.dir(result)
405 let u8dec = new TextDecoder('utf-8')
417 console.dir(attestationObject)
424 console.dir(authData)
431 console.dir(window.rawKey)
434 let pk = "sk-ecdsa-sha2-nistp256@openssh.com " + pk64
442 …let privkey = "-----BEGIN OPENSSH PRIVATE KEY-----\n" + wrapString(privk64, 70) + "-----END OPENSS…
495 console.dir(pk)
498 if (pk[-1] != 1) {
501 if (pk[3] != -7) {
504 if (pk[-2].byteLength != 32 || pk[-3].byteLength != 32) {
512 msg.putString("sk-ecdsa-sha2-nistp256@openssh.com") // Key type
514 msg.putECPoint(pk[-2], pk[-3]) // EC key
522 msg.putString("sk-ecdsa-sha2-nistp256@openssh.com") // Key type
524 msg.putECPoint(pk[-2], pk[-3]) // EC key
544 msg.putStringRaw("openssh-key-v1") // Magic
572 // Format a sshsig-style message.
574 let msghash = await crypto.subtle.digest("SHA-512", encmsg);
576 console.dir(msghash)
586 console.dir(msg)
595 type: 'public-key',
602 console.dir(assertReqOpts)
629 console.dir(result)
634 let u8dec = new TextDecoder('utf-8')
654 "-----BEGIN SSH SIGNATURE-----\n" + linewrap(sig64) +
655 "-----END SSH SIGNATURE-----\n";
659 function reformatSignature(sig, clientData, authData) {
660 if (sig.byteLength < 2) {
664 let v = new DataView(sig)
672 if ((seqlen & 0x80) != 0 || seqlen != sig.byteLength - offset) {
673 …re has unexpected length " + seqlen.toString() + " vs expected " + (sig.byteLength - offset).toStr…
683 if ((rlen & 0x80) != 0 || rlen > sig.byteLength - offset) {
684 …ture r has unexpected length " + rlen.toString() + " vs buffer " + (sig.byteLength - offset).toStr…
686 let r = sig.slice(offset, offset + rlen)
689 console.dir(r)
698 if ((slen & 0x80) != 0 || slen > sig.byteLength - offset) {
699 …ture s has unexpected length " + slen.toString() + " vs buffer " + (sig.byteLength - offset).toStr…
701 let s = sig.slice(offset, offset + slen)
703 console.dir(s)
706 if (offset != sig.byteLength) {
707 …nal offset during signature parsing " + offset.toString() + " expected " + sig.byteLength.toString…
717 rawsshsig.putString("webauthn-sk-ecdsa-sha2-nistp256@openssh.com")