-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathintegration.html
executable file
·402 lines (332 loc) · 23.4 KB
/
integration.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="assets/images/favicon.png" />
<!-- Core css -->
<link rel="stylesheet" id="bulma" href="assets/css/bulma.css" />
<link rel="stylesheet" type="text/css" href="assets/css/core_lemonade.css">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<!-- Plugins css -->
<link rel="stylesheet" type="text/css" href="assets/js/ggpopover/ggtooltip.css">
<!-- Icons -->
<link rel="stylesheet" type="text/css" href="assets/css/icons.min.css">
<!-- COMMON TAGS -->
<meta charset="utf-8">
<title>Digi-ID - Integration</title>
<!-- Search Engine -->
<meta name="description" content="The blockchain-based cryptographic solution to handling user authentication. Powered by DigiByte blockchain.">
<meta name="image" content="https://digi-id.io/assets/scenarium/GeneralOG-03.png">
<!-- Schema.org for Google -->
<meta itemprop="name" content="Digi-ID - Blockchain Open Auth">
<meta itemprop="description" content="The blockchain-based cryptographic solution to handling user authentication. Powered by DigiByte blockchain.">
<meta itemprop="image" content="https://digi-id.io/assets/scenarium/GeneralOG-03.png">
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Digi-ID - Blockchain Open Auth">
<meta name="twitter:description" content="The blockchain-based cryptographic solution to handling user authentication. Powered by DigiByte blockchain.">
<meta name="twitter:site" content="@DigiByteCoin">
<meta name="twitter:creator" content="@cengic_damir">
<meta name="twitter:image:src" content="https://digi-id.io/assets/scenarium/TwitterOG-02.png">
<!-- Open Graph general (Facebook, Pinterest & Google+) -->
<meta name="og:title" content="Digi-ID - Blockchain Open Auth">
<meta name="og:description" content="The blockchain-based cryptographic solution to handling user authentication. Powered by DigiByte blockchain.">
<meta name="og:image" content="https://digi-id.io/assets/scenarium/FacebookOG-01.png">
<meta name="og:url" content="https://digi-id.io">
<meta name="og:site_name" content="Digi-ID Website">
<meta name="og:type" content="website">
</head>
<body>
<!-- Pageloader -->
<div class="pageloader"></div>
<div class="infraloader is-active"></div>
<!-- Hero and nav -->
<div class="hero is-theme-primary">
<div class="navbar-wrapper navbar-fade navbar-light">
<div class="hero-head">
<!-- Nav -->
<div class="container">
<nav class="nav">
<div class="container big">
<div class="nav-left">
<a class="nav-item" href="index.html">
<img class="medium-footer-logo" src="assets/scenarium/logo.svg" alt="">
</a>
<!-- Sidebar trigger -->
<a href="index.html" class="nav-item is-tab nav-inner is-not-mobile">
Home
</a>
<a href="documentation.html" class="nav-item is-tab nav-inner is-not-mobile">
Documentation
</a>
<a href="getstarted.html" class="nav-item is-tab nav-inner is-not-mobile">
Get started
</a>
<a href="contact.html" class="nav-item is-tab nav-inner is-not-mobile">
Contact
</a>
</div>
<!-- Responsive toggle -->
<span class="nav-toggle">
<span></span>
<span></span>
<span></span>
</span>
<div class="nav-right nav-menu">
<a href="https://digi-id.io" class="nav-item is-tab nav-inner is-menu-mobile">
Home
</a>
<a href="documentation.html" class="nav-item is-tab nav-inner is-menu-mobile">
Documentation
</a>
<a href="getstarted.html" class="nav-item is-tab nav-inner is-menu-mobile">
Get started
</a>
<a href="/#implementations" class="nav-item is-tab nav-inner is-menu-mobile">
Implementations
</a>
<a href="contact.html" class="nav-item is-tab nav-inner is-menu-mobile">
Contact
</a>
</div>
</div>
</nav>
</div>
<!-- /Nav -->
</div>
</div>
<!-- Help title -->
<div id="main-hero" class="hero-body">
<div class="container">
<div class="columns is-vcentered pt-40">
<div class="column"></div>
<div class="column is-9">
<div class="help-header pb-20">
<img src="assets/images/logos/square-white.svg" alt="">
<h1 class="title is-4">Digi-ID Documentation</h1>
</div>
<div class="help-subheader">
<h2 class="title is-3">Find your answer in our expanding knowledge base</h2>
</div>
<!-- IGNORE FOR NOW -->
<!--<div class="help-search-wrapper">
<input type="text" placeholder="search articles">
<i class="sl sl-icon-magnifier"></i>
</div>
-->
</div>
<div class="column"></div>
</div>
</div>
</div>
<!-- /Help title -->
</div>
<!-- /Hero and nav -->
<!-- Article section -->
<div class="section help-section is-relative">
<div class="container">
<div class="columns is-vcentered">
<div class="column"></div>
<div class="column is-9 help-container">
<!-- Breadcrumbs -->
<nav class="breadcrumbs">
<ul>
<li><a href="documentation.html">Documentation</a></li>
<li>Integration guide</li>
</ul>
</nav>
<!-- /Breadcrumbs -->
<!-- Article body -->
<div class="flex-card single-help-article">
<div class="article-inner">
<!-- Article meta -->
<h2 class="title is-3 dark-text">
Digi-ID Integration guide
</h2>
<h3 class="subtitle is-5">Guidelines for incorporating Digi-ID into your platform</h3>
<div class="article-meta">
<i class="im im-icon-Clock-4" style="font-size: 2.5em;padding-top:0.5%; color: #0066cc;"></i>
<div class="meta-info" >
<div class="author" style="color: #0066cc;">Read time:</span></div>
<div class="status" style="color: #0066cc;">7 minutes</div>
</div>
</div>
<!-- /Article meta -->
<!-- Article content -->
<div class="content">
<p>Digi-ID is an open protocol that allows for fast, simple and yet incredibly secure authentication based on the DigiByte Blockchain. Digi-ID utilizes public key cryptography much in the same way keyless SSH access works, just with a user-friendly wrapper around it.
</p>
<h4 class="subtitle is-5 dark-text">Specification</h4>
<p>Prior to being given access to a secure / restricted area of a website or service, the user will be shown a QR code, potentially alongside existing authentication methods:</p>
<div align="center"><img src="assets/scenarium/login.png"></div>
<p>The QR code contains:</p>
<span class="coder">digiid://www.website.com/callback?x=NONCE</span>
<ul>
<li>digiid is the protocol scheme used to trigger mobile applications when tapped</li>
<li>www.website.com/callback is the callback URL. https is strongly recommended.</li>
<li>x=NONCE is the nonce which must always be unique and will be linked to the users session ID</li>
</li>
</ul>
<p>http is only accepted with “&u=1” appended to the callback URL, however this is only recommended during development / testing and should not be used in production environments. Digi-ID is not a substitute for SSL encryption.</p>
<p>Once the QR code is scanned by the user in the Digi-ID authenticator or DigiByte Wallet, the user will be prompted to confirm authentication for the target service.</p>
<div align="center"><img src="assets/scenarium/sensor.png"></div>
<p>The user will then enter their unique PIN or scan their fingerprint to confirm. They will be prompted with a dialog box or toast message indicating success or an error message if applicable.</p>
<p>
The server verifies the signature validity, then allows the user access to the authenticated session. Only the users public key needs to be kept on the server, though naturally additional information can be stored alongside as needed, though everything else is optional from an authentication perspective.</p><p>
The server should also have a timeout for the nonce validity in order to prevent replay attacks.
</p>
<h4 class="subtitle is-5 dark-text">Is there a sample PHP library to help me integrate Digi-ID?</h4>
<p>Yes, it’s available at <a href="https://github.com/digibyte-core/digiid-php">GitHub</a>.</p>
<h4 class="subtitle is-5 dark-text">Is there a sample Javascript library to help me integrate Digi-ID?</h4>
<p>Yes, it is available <a href="https://github.com/digibyte-core/digiid-js">here</a>.</p>
<h4 class="subtitle is-5 dark-text">What is a preferred time for the nonce timeout?</h4>
<p>Depending on the application this may need to be shortened or lengthened. For most websites, a 90-second expiration is likely sufficient, in order to minimize time for replay attempts.</p>
<h4 class="subtitle is-5 dark-text">Do I need the DigiByte “D” in the QR code?</h4>
<p>No, this is completely optional. We recommend prefixing the QR code with “Login with Digi-ID” in order to avoid any confusion for users.</p>
<h4 class="subtitle is-5 dark-text">Do I need to run a full DigiByte node to utilize Digi-ID?</h4>
<p>There is no need to run a full DigiByte node, the PHP and Javascript libraries are a complete implementation that do not require any external connections to the DigiByte Blockchain or 3rd party service</p>
<h4 class="subtitle is-5 dark-text">Can this work in a WAN / offline scenario?</h4>
<p>Yes, provided there is a way for the Digi-ID authenticator to resolve the callback URL (Such as WiFi / WAN), Digi-ID will work just fine.</p>
<h4 class="subtitle is-5 dark-text">How can Digi-ID be used for building access control?</h4>
<p>A screen that generates a QR Code can be set up near a door or other restricted area. The user scans this QR code with their cellphone using the Digi-ID Authenticator or DigiByte Wallet, as they would for a website. Once scanned, this sends the encrypted message to your central building authentication server which keeps track of which QR code was scanned by each door having a unique callback URL. Your server then matches the users public address to the relevant door and if authorized it unlocks the door for the user.</p>
<h4 class="subtitle is-5 dark-text">Why do users get different addresses across different sites</h4>
<p>Because the domain name is included in the hash, it means if you use multiple callback URLs (Perhaps in the building security example above), provided they all use the same domain-name then the public key generated will be the same. The protocol and the domain are hashed in when signing, but the path after the / in the URL is not used.</p>
<h4 class="subtitle is-5 dark-text">Can Digi-ID be integrated in to a 3rd-party wallet?</h4>
<p>Yes, absolutely!</p>
<ul>
<li>URI is the callback URI and not the Digi-ID URI</li>
<li><b>index</b> is a 32-bit unsigned int, which is used to generate more keys corresponding to the same URI. If not set this should be assumed “0”, as it is not currently utilized in any of the DigiByte Go / Mobile wallets or Authenticators</li>
</ul>
<p><b>HD structure</b></p>
<ol>
<li>Concatenate the little endian representation of index with the URI</li>
<li>Compute the SHA256 hash of the result</li>
<li>Take the first 128 bits of the hash and split it in to 4x 32-bit numbers, A, B, C & D (each in little endian notation)</li>
<li>Set highest bits of numbers A, B, C & D to 1</li>
<li>Derive the HD node m/13’/A’/B’/C’/D’ according to BIP32</li>
</ol>
<p><b>Testing</b></p>
<p>
<b>BIP39 seed</b>: myth glimpse mystery abstract embark net faint hospital catch hint develop state<br>
<b>Callback URI</b>: digiid://digiid.digibyteprojects.com/callback?x=c6140375e5bae71e<br>
<b>Index</b>: 0<br>
<b>Hash result</b>: 460ebbfd1df7410106d62d41f802f769bc00db825e9cf8c649cb069dec35e8fb<br>
<b>BIP32 path</b>: m/2147483661/4256894534/2168583965/3241006598/3925279480<br>
<b>Digi-ID address</b>: DJDAkjie6nrW6RpFZSTpNUXsZ9JE2x6p1o<br>
</p>
</div>
<!-- /Article content -->
<!-- Rating section -->
<div class="rating-section">
<div class="question">Was this info helpful ?</div>
<div class="rating-buttons">
<span class="rating-button">
<i class="material-icons">sentiment_very_dissatisfied</i>
</span>
<span class="rating-button">
<i class="material-icons">sentiment_neutral</i>
</span>
<span class="rating-button">
<i class="material-icons">sentiment_very_satisfied</i>
</span>
</div>
</div>
<!-- /Rating section -->
</div>
</div>
<!-- /Article body -->
</div>
<div class="column"></div>
</div>
</div>
</div>
<!-- Article section -->
<!-- Footer -->
<footer class="footer footer-light-medium">
<div class="container">
<div class="columns">
<!-- Column -->
<div class="column is-4">
<div class="pt-10 pb-10">
<img class="medium-footer-logo" src="assets/scenarium/logo.svg" alt="">
<div class="footer-description pt-10 pb-10">
Digi-ID is an open-source, community-driven Open Auth project based on the DigiByte Blockchain. It will always remain free. <br><br>
</div>
</div>
<div>
<span class="moto">Web by Damir.</span>
<br><span class="moto">Digi-ID © 2024</span>
<div class="social-links pt-10 pb-10">
<a href="https://twitter.com/digibytecoin">
<span class="icon"><i class="fa fa-twitter"></i></span>
</a>
<a href="https://t.me/DigiByteCoin">
<span class="icon"><i class="fa fa-paper-plane"></i></span>
</a>
<a href="https://t.me/DigiByteDevelopers">
<span class="icon"><i class="fa fa-paper-plane"></i></span>
</a>
<a href="https://github.com/digibyte-core/digiid-js">
<span class="icon"><i class="fa fa-github"></i></span>
</a>
</div>
</div>
</div>
<!-- Column -->
<div class="column is-6 is-offset-2">
<div class="columns">
<!-- Column -->
<div class="column">
<ul class="footer-column">
<li class="column-header">
Digi-ID
</li>
<li class="column-item"><a href="https://digi-id.io">Home</a></li>
<li class="column-item"><a href="https://digi-id.io/#getting_started">Getting started</a></li>
<li class="column-item"><a href="pricing.html">Pricing (Free)</a></li>
</a>
</ul>
</div>
<!-- Column -->
<div class="column">
<ul class="footer-column">
<li class="column-header">
Resources
</li>
<li class="column-item"><a href="https://github.com/digibyte-core/digiid-js">GitHub Repo</a></li>
<li class="column-item"><a href="faq.html">Frequent questions</a></li>
<li class="column-item"><a href="https://digibyte.org">DigiByte</a></li>
<li class="column-item"><a href="https://dgbwiki.com">DigiByte Wiki</a></li>
</ul>
</div>
<!-- Column -->
<div class="column">
<ul class="footer-column">
<li class="column-header">
Terms
</li>
<li class="column-item"><a href="disclaimer.html" target="_blank">Disclaimer</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</footer>
<!-- /Footer -->
<!-- Back To Top Button -->
<div id="backtotop"><a href="#"></a></div>
<!-- Core js -->
<script src="assets/js/core/jquery.min.js"></script>
<script src="assets/js/core/modernizr.min.js"></script>
<!-- Plugins js -->
<script src="assets/js/ggpopover/ggtooltip.js"></script>
<script src="assets/js/embed/embed.js"></script>
<!-- Bulkit js -->
<script src="assets/js/main.js"></script>
<!-- Page specific js -->
<script src="assets/js/pages/landingv3.js"></script>
</body>
</html>