G

Self declaration of identity

public
Guest Oct 12, 2024 Never 26
Clone
HTML index.html 425 lines (419 loc) | 22.73 KB
1
<html>
2
<head>
3
<meta charset="utf-8">
4
<meta name="viewport" content="width=device-width, initial-scale=1">
5
<meta name="robots" content="index, follow">
6
<title>Memdeklaro de identeco</title>
7
<meta name="description" content="Esperanto self-declaration of identity">
8
<link href="https://epo.codeberg.page/memdeklaro/favicon.ico" rel="shortcut icon">
9
<style>
10
@font-face {
11
font-family: "OCR-B";
12
src: url("https://epo.codeberg.page/memdeklaro/OCR-B.ttf");
13
}
14
html {
15
font-family: sans-serif;
16
}
17
body {
18
max-width: 1200px;
19
margin: 0 auto;
20
font-size: 16px;
21
}
22
.preview {
23
width: 600px;
24
display: inline-block;
25
vertical-align: top;
26
background: #eee;
27
padding: 15px;
28
}
29
.preview .front, .preview .back {
30
margin-bottom: 10px;
31
}
32
.preview .front.default, .preview .back.default {
33
min-height: 300px;
34
width: 100%;
35
background-size: contain;
36
background-repeat: no-repeat;
37
background-position: center;
38
}
39
.preview .front.default .button, .preview .back.default .button {
40
display: none;
41
}
42
.preview .front.default {
43
background-image: url("https://epo.codeberg.page/memdeklaro/fronto.jpg");
44
}
45
.preview .back.default {
46
background-image: url("https://epo.codeberg.page/memdeklaro/dorso.jpg");
47
}
48
.preview canvas {
49
max-width: 100%;
50
}
51
.form {
52
width: calc(100% - 670px);
53
display: inline-block;
54
vertical-align: top;
55
margin-left: 20px;
56
}
57
.form label {
58
display: block;
59
margin-bottom: 14px;
60
font-size: 15px;
61
font-weight: bold;
62
}
63
input[type="text"], input[type="file"], textarea {
64
display: block;
65
width: 100%;
66
border-radius: 5px;
67
border: 1px solid #555;
68
padding: 2px 6px;
69
font-size: 15px;
70
margin-top: 4px;
71
margin-left: 4px;
72
vertical-align: top;
73
}
74
button, a.button {
75
font-size: 15px;
76
border: 1px solid green;
77
padding: 6px 24px;
78
border-radius: 5px;
79
background: lightgreen;
80
margin: 10px auto;
81
display: block;
82
text-decoration: none;
83
width: auto;
84
color: #000;
85
text-align: center;
86
cursor: pointer;
87
}
88
button:hover, a.button:hover {
89
background: green;
90
color: #fff;
91
text-decoration: none;
92
}
93
.info {
94
margin: 20px 100px;
95
line-height: 130%;
96
}
97
@media only screen and (max-width: 1100px) {
98
body {
99
max-width: calc(100% - 30px);
100
}
101
.preview {
102
width: calc(100% - 60px);
103
display: block;
104
margin: 10px auto;
105
}
106
.form {
107
width: calc(100% - 60px);
108
display: block;
109
margin: 10px auto;
110
}
111
.info {
112
margin: 20px 20px;
113
}
114
.preview .front, .preview .back {
115
margin: 10px auto;
116
max-width: 600px;
117
}
118
}
119
</style>
120
</head>
121
<body>
122
<div class="container">
123
<div class="intro">
124
<h1>Self-declaration of identity (Memdeklaro de identeco)</h1>
125
<p>The self-declaration of identity is a philosophical project. Unfortunately it cannot be used for real-life situations such as jobs, apartment rentals, receiving mail, etc.</p>
126
<p>This generator works locally in your browser. No data is sent to a server or saved.</p>
127
</div>
128
<div class="preview">
129
<div class="front default">
130
<canvas id="canvas_front"></canvas>
131
<button id="download_front" class="button" onclick="download_front(); return false;">Download front</button>
132
</div>
133
<div class="back default">
134
<canvas id="canvas_back"></canvas>
135
<button id="download_back" class="button" onclick="download_back(); return false;">Download back</button>
136
</div>
137
</div>
138
<div class="form">
139
<form method="post" enctype="multipart/form-data" onsubmit="generate_mrz(); update_declaration(); return false;">
140
<label>
141
First name
142
<input type="text" name="first_name" id="first_name" maxlength="255" placeholder="First name" value="JOHN" required>
143
</label>
144
<label>
145
Surname
146
<input type="text" name="surname" id="surname" maxlength="255" placeholder="Surname" value="DOE" required>
147
</label>
148
<label>
149
Birth date
150
<input type="text" name="birth_date" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" id="birth_date" placeholder="YYYY-MM-DD" value="2000-01-01" required>
151
</label>
152
<label>
153
Date of issuance
154
<input type="text" name="issued" id="issued" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" placeholder="YYYY-MM-DD" value="2024-01-31" required>
155
</label>
156
<label>
157
Date of expiry
158
<input type="text" name="expiry" id="expiry" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" placeholder="YYYY-MM-DD" value="2029-01-31" required>
159
</label>
160
<label>
161
ID number (9 digits)
162
<input type="text" name="id_number" id="id_number" pattern="[0-9]{9}" placeholder="111222333" value="111222333" required>
163
</label>
164
<label>
165
Note
166
<textarea name="note" id="note" maxlength="255" placeholder="Note (max 2 lines)" required></textarea>
167
</label>
168
<label>
169
Issuer
170
<input type="text" name="issuer" id="issuer" maxlength="120" placeholder="EPO" value="EPO" required>
171
</label>
172
<label>
173
MRZ
174
<textarea name="mrz" id="mrz" placeholder="MRZ (Auto generated)" readonly></textarea>
175
</label>
176
<label>
177
Photo (35mm x 45mm)
178
<input type="file" name="photo" id="photo" accept="image/*">
179
</label>
180
<label>
181
Signature
182
<input type="file" name="signature" id="signature" accept="image/*">
183
</label>
184
<button class="button" type="submit" id="submit" name="submit">Generate</button>
185
</form>
186
</div>
187
</div>
188
<div class="info">
189
<h2>Warning</h2>
190
<p>ID documents do more harm than good and should not be seen as a solution for trust or authentication. Many economic and social interactions can be done anonymously. For other situations, trust can be achieved by simply saying your (self-chosen) name, using a web-of-trust, word-of-mouth reputation, vouches, memberships, escrows or cash deposits, and authentication can be achieved by using a password, cryptographic key pair (e.g. PGP, Bitcoin) or physical key or code (such as house keys or a safe code).</p>
191
<h2>Background</h2>
192
<p>In recent years, more and more things are asking for proof of identity, from basic necessities like jobs, housing and healthcare, to smaller things like receiving mail, buying a sim card or joining a gym. However, it is not enough to write your name and address on a form. Instead, only government-issued IDs are accepted, which gives the state a “monopoly on identity”.</p>
193
<p>Monopolies are dangerous in general due to the fact that if the service provider is harmful, inaccessible or otherwise problematic, you cannot choose a different provider, start your own provider, or go without. This particular monopoly is even worse, considering that access to government ID determines if you may participate in the economy (jobs, banking), society (housing, volunteer work, education, libraries, sports) or even exist (national borders).</p>
194
<p>Many people have no access to government ID. This group includes some stateless people, refugees, people who weren’t registered at birth, and people who escaped from child abuse, domestic abuse or cult abuse. The state’s claimed solutions, such as asylum procedures, stateless determination procedures, delayed registration of birth, child protective services and witness protection, often cannot help in practice, as the victim is often ignored, accused of lying, blamed for the persecution or sent back to the persecutors against their will. Despite issuing laissez-passer passports in the past, the United Nations and Red Cross do not issue alternative IDs today. It would be a relief if these processes would work and allow vulnerable people to escape from undeserved and dangerous situations, but unfortunately this is not the reality.</p>
195
<p>In addition, the collectivist concept of citizenship can be dangerous. For example, if someone does not identify with their birth culture, they should not be forced to follow it for life or identify themselves as a member of this culture. Instead, they should be free to dissent against this culture or leave this culture’s jurisdiction. Even worse is conscription - the cruel system where a nation-state can force someone against their will to kill or be killed, just because they happened to be born inside a certain territory. The world would be more free if people could exist as individuals, conscientious objectors against the fatalism of birth cultures and violence of statism, with freedom of association to leave hostile environments and join self-chosen communities.</p>
196
<p>“The blood of the covenant is thicker than the water of the womb.”</p>
197
<p>Self-declaration of identity gives people the power to decide their own fate. People are no longer the property of nations, governments, birth cultures or birth parents. The choice of your own name and renunciation of your circumstances of birth is a liberating act of individualism.</p>
198
<h2>Self-declaration of identity</h2>
199
<p>Instead of depending on third parties such as birth countries, birth cultures and birth parents to define an individual’s identity, the self-declaration allows you to define your own name and eschews the concepts of birth countries and citizenship.</p>
200
<p>The self-declaration is a CR-80 plastic card or paper business card (85.6mm x 54mm). The self-declaration is written in Esperanto and includes the Esperanto flag and symbol. Esperanto was chosen because it is anational (not associated with a specific country, culture or state) and was created as a borderless language of peace, built on voluntary free association. The design features artwork of a peace dove in a blue sky with clouds.</p>
201
<p>It includes the text:</p>
202
<ul>
203
<li>Title: Self-declaration of identity (Memdeklaro de identeco)</li>
204
<li>Location: Esperanto community (Esperantujo)</li>
205
<li>Issuer: EPO (ISO code for Esperanto)</li>
206
<li>Quote: One world, one humankind (Unu mondo, unu homaro)</li>
207
</ul>
208
<p>The self-declaration of identity includes:</p>
209
<ul>
210
<li>Self-chosen first name (Antaŭnomo) and self-chosen surname (Nomo) → an individual should be able to freely choose their own name</li>
211
<li>Birth date (Naskiĝdato) → for declaration of age</li>
212
<li>Photo → Dimensions 35mm x 45mm</li>
213
<li>Signature (Subskribo) → sign your self-declaration</li>
214
<li>Notes field (Notoj) → a place to write a note, e.g. “the holder is a conscientious objector” (Portanto estas konscienca obĵetanto)</li>
215
<li>ID number (Numero), issuance date (Eldondato), expiry date (Limdato), issuer (Eldonisto), MRZ → bureaucratic boilerplate</li>
216
</ul>
217
<p>The self-declaration of identity does not include:</p>
218
<ul>
219
<li>Place of birth → allows people to cut ties with hostile environments and self-define their culture, beliefs and personal ties</li>
220
<li>Citizenship or stateless status → allows people to cut ties with hostile governments or cultures, and exist as an individual instead of as property of a state that they did not choose</li>
221
<li>Parents’ names → allows victims of child abuse to cut ties with abusers</li>
222
</ul>
223
<p>To make your own:</p>
224
<ul>
225
<li>Use the generator: Download this repo and open index.html in your browser</li>
226
<li>Or download the front template (fronto.jpg) and back template (dorso.jpg) and use an image editor such as GIMP to add your text (the font OCR-B.ttf is provided) and your photo and signature</li>
227
<li>Calculate the MRZ code here (TD1): <a href="https://www.dynamsoft.com/tools/mrz-generator/">https://www.dynamsoft.com/tools/mrz-generator/</a> or <a href="https://mrz.idtempl.com">https://mrz.idtempl.com</a> (Choose any country, then replace it with EPO)</li>
228
<li>Print it out as a business card and optionally laminate (dimensions: 85.6mm x 54mm) or order a CR-80 plastic card from a printing service</li>
229
</ul>
230
<p>Note:</p>
231
<p>Unfortunately the self-declaration of identity cannot be used to bypass government ID requirements, such as for jobs, housing, healthcare, receiving mail or buying a sim card. Other non-government IDs such as Digitalcourage Lichtbildausweis, World Passport and Sovereign Citizen documents have the same limitations.</p>
232
<p>Nation-states’ refusal to print IDs for undocumented, stateless and unregistered people (while forcing government ID requirements on employers, landlords, doctors and more) can and does put innocent people’s lives in danger. But unfortunately even the United Nations has not been able to change this, despite issuing conventions on statelessness and refugee status in the 1950s.</p>
233
<h2>Further Reading</h2>
234
<p>For further reading about identity (and why the state’s monopoly is harmful):</p>
235
<p>Passports Were a “Temporary” War Measure - Speranta Dumitru
236
<a href="https://fee.org/articles/passports-were-a-temporary-war-measure">https://fee.org/articles/passports-were-a-temporary-war-measure</a></p>
237
<p>During World War II, we did have something to hide - Hans de Zwart
238
<a href="https://medium.com/@hansdezwart/during-world-war-ii-we-did-have-something-to-hide-40689565c550">https://medium.com/@hansdezwart/during-world-war-ii-we-did-have-something-to-hide-40689565c550</a></p>
239
<p>With each person left living on the streets, we are losing as a society - Petr Baroch
240
<a href="https://www.statelessness.eu/blog/each-person-left-living-streets-we-are-losing-society">https://www.statelessness.eu/blog/each-person-left-living-streets-we-are-losing-society</a></p>
241
<p>The rarely discussed dangers of KYC and what you can do about it - AnarkioCrypto
242
<a href="https://vonupodcast.com/know-your-customer-kyc-the-rarely-discussed-danger-guest-article-audio">https://vonupodcast.com/know-your-customer-kyc-the-rarely-discussed-danger-guest-article-audio</a></p>
243
<p>Exclusion and identity: life without ID - Privacy International
244
<a href="https://www.privacyinternational.org/long-read/2544/exclusion-and-identity-life-without-id">https://www.privacyinternational.org/long-read/2544/exclusion-and-identity-life-without-id</a></p>
245
<p>Proving who I am: the plight of people in detention without proof of legal identity - Vicki Prais
246
<a href="https://www.penalreform.org/blog/proving-who-i-am-the-plight-of-people/">https://www.penalreform.org/blog/proving-who-i-am-the-plight-of-people/</a></p>
247
<p>Establishing identity is a vital, risky and changing business - The Economist
248
<a href="https://www.economist.com/christmas-specials/2018/12/18/establishing-identity-is-a-vital-risky-and-changing-business">https://www.economist.com/christmas-specials/2018/12/18/establishing-identity-is-a-vital-risky-and-changing-business</a></p>
249
<p>What’s in a name? The case for inclusivity through anonymity - Common Thread
250
<a href="https://blog.twitter.com/common-thread/en/topics/stories/2021/whats-in-a-name-the-case-for-inclusivity-through-anonymity">https://blog.twitter.com/common-thread/en/topics/stories/2021/whats-in-a-name-the-case-for-inclusivity-through-anonymity</a></p>
251
<p>True Names Not Required: On Identity and Pseudonymity in Cyberspace - DerGigi
252
<a href="https://dergigi.medium.com/true-names-not-required-fc6647dfe24a">https://dergigi.medium.com/true-names-not-required-fc6647dfe24a</a></p>
253
<p>Citizenship is obsolete - Samuela Davidova
254
<a href="https://medium.com/@DavidovaSamuela/citizenship-is-obsolete-c36a20056752">https://medium.com/@DavidovaSamuela/citizenship-is-obsolete-c36a20056752</a></p>
255
<h2>License</h2>
256
<p>Public Domain</p>
257
</div>
258
<hr>
259
<script>
260
function generate_mrz() {
261
var first_name = document.querySelector("#first_name").value;
262
var first_name = first_name.replace(/[\-\ ]/g, "<");
263
var first_name = first_name.normalize("NFD").replace(/[^A-Z\<]/gi, "").toUpperCase();
264
var surname = document.querySelector("#surname").value;
265
var surname = surname.replace(/[\-\ ]/g, "<");
266
var surname = surname.normalize("NFD").replace(/[^A-Z\<]/gi, "").toUpperCase();
267
var birth_date = document.querySelector("#birth_date").value;
268
var birth_date = birth_date.split("-").join("").substring(2);
269
var expiry = document.querySelector("#expiry").value;
270
var expiry = expiry.split("-").join("").substring(2);
271
var id_number = document.querySelector("#id_number").value;
272
var final = checksum(id_number + checksum(id_number) + birth_date + checksum(birth_date) + expiry + checksum(expiry));
273
var mrz1 = "I<EPO" + id_number + checksum(id_number) + "<<<<<<<<<<<<<<<";
274
var mrz2 = birth_date + checksum(birth_date) + "<" + expiry + checksum(expiry) + "<<<<<<<<<<<<<<" + final;
275
var mrz3 = surname + "<<" + first_name;
276
if(mrz3.length >= 30) {
277
var mrz3 = mrz3.slice(0, 29);
278
}
279
while(mrz3.length < 30) {
280
var mrz3 = mrz3 + "<";
281
}
282
document.querySelector("#mrz").value = mrz1 + "\n" + mrz2 + "\n" + mrz3;
283
}
284
285
function checksum(str) {
286
var counter = 0;
287
var total = 0;
288
for(var i = 0; i < str.length; i++) {
289
if(counter == 3) {
290
var counter = 0;
291
}
292
if(counter == 0) {
293
var total = total + (parseInt(str[i]) * 7);
294
}
295
if(counter == 1) {
296
var total = total + (parseInt(str[i]) * 3);
297
}
298
if(counter == 2) {
299
var total = total + (parseInt(str[i]) * 1);
300
}
301
counter++;
302
}
303
var check_digit = total % 10;
304
return check_digit;
305
}
306
307
function update_declaration() {
308
document.querySelector("#submit").innerText = "Generating, please wait...";
309
document.fonts.load("54px OCR-B").then(() => {
310
var surname = document.querySelector("#surname").value;
311
var first_name = document.querySelector("#first_name").value;
312
var birth_date = document.querySelector("#birth_date").value;
313
var issued = document.querySelector("#issued").value;
314
var expiry = document.querySelector("#expiry").value;
315
var id_number = document.querySelector("#id_number").value;
316
var note = document.querySelector("#note").value;
317
var issuer = document.querySelector("#issuer").value;
318
var mrz = document.querySelector("#mrz").value;
319
var photo = document.querySelector("#photo").files[0];
320
var signature = document.querySelector("#signature").files[0];
321
322
var canvas_front = document.querySelector("#canvas_front");
323
var ctx_front = canvas_front.getContext("2d");
324
var template_front = new Image();
325
template_front.onload = () => {
326
document.querySelector(".front").classList.remove("default");
327
canvas_front.width = template_front.width;
328
canvas_front.height = template_front.height;
329
ctx_front.drawImage(template_front, 0, 0);
330
ctx_front.font = "58px OCR-B";
331
ctx_front.fillStyle = "rgb(0, 0, 0)";
332
ctx_front.textAlign = "left";
333
ctx_front.textBaseline = "top";
334
ctx_front.fillText(surname, 860, 335);
335
ctx_front.fillText(first_name, 860, 515);
336
ctx_front.font = "52px OCR-B";
337
ctx_front.fillText(birth_date, 860, 695);
338
ctx_front.fillText(issued, 860, 875);
339
ctx_front.fillText(expiry, 1420, 875);
340
ctx_front.fillText(id_number, 1420, 1055);
341
var add_photo = new Image();
342
add_photo.onload = () => {
343
var radius = 40;
344
var x1 = 60;
345
var x2 = 60 + 745;
346
var y1 = 256;
347
var y2 = 256 + 956;
348
ctx_front.beginPath();
349
ctx_front.moveTo((x1 + radius), y1);
350
ctx_front.arcTo(x2, y1, x2, y2, radius);
351
ctx_front.arcTo(x2, y2, x1, y2, radius);
352
ctx_front.arcTo(x1, y2, x1, y1, radius);
353
ctx_front.arcTo(x1, y1, x2, y1, radius);
354
ctx_front.closePath();
355
ctx_front.save();
356
ctx_front.clip();
357
ctx_front.drawImage(add_photo, 60, 256, 745, 956);
358
ctx_front.restore();
359
};
360
add_photo.src = URL.createObjectURL(photo);
361
var add_signature = new Image();
362
add_signature.onload = () => {
363
ctx_front.globalCompositeOperation = "multiply";
364
ctx_front.drawImage(add_signature, 870, 1055, Math.round(add_signature.width * (150 / add_signature.height)), 150);
365
ctx_front.globalCompositeOperation = "source-over";
366
};
367
add_signature.src = URL.createObjectURL(signature);
368
document.querySelector("#submit").innerText = "Generate";
369
};
370
template_front.src = "https://epo.codeberg.page/memdeklaro/fronto.jpg";
371
372
var canvas_back = document.querySelector("#canvas_back");
373
var ctx_back = canvas_back.getContext("2d");
374
var template_back = new Image();
375
template_back.onload = () => {
376
document.querySelector(".back").classList.remove("default");
377
canvas_back.width = template_back.width;
378
canvas_back.height = template_back.height;
379
ctx_back.drawImage(template_back, 0, 0);
380
ctx_back.font = "50px OCR-B";
381
ctx_back.fillStyle = "rgb(0, 0, 0)";
382
ctx_back.textAlign = "left";
383
ctx_back.textBaseline = "top";
384
var note_line_height = 70;
385
var note_lines = note.split("\n");
386
for(var i = 0; i < note_lines.length; i++) {
387
ctx_back.fillText(note_lines[i], 55, 155 + (note_line_height * i));
388
}
389
ctx_back.font = "58px OCR-B";
390
ctx_back.fillText(issuer, 55, 415);
391
ctx_back.font = "60px OCR-B";
392
var mrz_line_height = 90;
393
var mrz_lines = mrz.split("\n");
394
for(var i = 0; i < mrz_lines.length; i++) {
395
ctx_back.fillText(mrz_lines[i], 215, 890 + (mrz_line_height * i));
396
}
397
};
398
template_back.src = "https://epo.codeberg.page/memdeklaro/dorso.jpg";
399
});
400
}
401
402
function download_front() {
403
var download_link = document.createElement("a");
404
download_link.setAttribute("download", "front.png");
405
var canvas = document.querySelector("#canvas_front");
406
canvas.toBlob(function(blob) {
407
var url = URL.createObjectURL(blob);
408
download_link.setAttribute("href", url);
409
download_link.click();
410
});
411
}
412
413
function download_back() {
414
var download_link = document.createElement("a");
415
download_link.setAttribute("download", "back.png");
416
var canvas = document.querySelector("#canvas_back");
417
canvas.toBlob(function(blob) {
418
var url = URL.createObjectURL(blob);
419
download_link.setAttribute("href", url);
420
download_link.click();
421
});
422
}
423
</script>
424
</body>
425
</html>