blockchainIDsystem/README.md
README.mdRaw
1# blockchainIDsystem
2A blockchain based anonymous distributed login system
3
4Outdated repository. The current repository being developed is: https://github.com/arnaucode/darkID
5
6### Warning! Academical version. Outdated repository.
7This version is only for academical purposes, is not a version to run in production. Everything has been developed from scratch (the p2p network, the blockchain, the RSA library, ...) to learn it deeply.
8Also this version is not finished.
9
10A new version of this project, being developed using libaries and Ethereum network, is in https://github.com/arnaucode/darkID
11
12### Main concept
13The objective is to guarantee a decentralized login system, but making sure that registered users are real ones and there are no bots generating large amounts of accounts. Only the verified (by email or phone) users can generate an anonymous ID (the Public-Key blind signed).
14
15
16
17
18
19
20## How it works?
21
22
23#### Network infrastructure
24
25
26
27There are different types of nodes:
28- peers
29 - the peers of the p2p network that runs the blockchain
30- serverCA
31 - Is a REST server that has been certified (is the Certified Authority) to validate the peers that will be able to participate of the blockchain.
32 - Have the webapp (frontend) to validate peers through a GUI interface
33 - The GUI frontend webapp allows also to view the current peers of the network and the blocks of the blockchain
34- server-ID-signer
35 - The server where the user creates a non anonymous account
36 - Also is the server that blind signs the Anonymous ID of the users
37 - Have the webapp (frontend) to interact through a GUI interface
38
39#### Step by step process
401. Once all the nodes of the network are running, a new user can connect to the server-ID-signer.
412. The user registers a non anonymous user (using email, phone, password, etc), and performs the login with that user
423. The user, locally, generates a RSA key pair (private key & public key)
434. The user blinds his Public-Key with the server-ID-signer Public-Key
445. The user's Public-Key blinded, is sent to the server-ID-signer
456. The server-ID-signer Blind Signs the Public-Key blinded from the user, and returns it to the user
467. The user unblinds the Public-Key signed by the server-ID-signer, and now has the Public-Key Blind Signed by the server-ID-signer
478. The user sends the Public-Key blind signed to the p2p network
489. The peers verify that the Public-Key Blind Signed is correctly signed by the server-ID-signer, if it is, they add the Public-Key to the Blockchain, inside a new block
4910. Then, when the user wants to login into a platform, just needs to put his Public-Key
5011. The platform goes to the Blockchain, to check if this Public-Key is registered in the blockchain
5112. The platform sends a message encrypted with the user Public-Key, and the user returns the message decrypted with the Private-Key, to verify that is the owner of that Public-Key
52
53
54##### RSA encryption system
55https://en.wikipedia.org/wiki/RSA_cryptosystem
56- Public parameters: (e, n)
57- Private parameters: (d, p, q, phi, sigma)
58- Public-Key = (e, n)
59- Private-Key = (d, n)
60- Encryption:
61
62- Decryption:
63
64
65
66##### Blind signature process
67https://en.wikipedia.org/wiki/Blind_signature
68- m is the message (in our case, is the Public-Key of the user to be blinded)
69
70
71- server-ID-signer blind signs m'
72
73
74- user can unblind m, to get m signed
75
76
77- This works because RSA keys satisfy this equation
78 and this 