You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
4.5 KiB

6 years ago
  1. # blockchainIDsystem
  2. A blockchain based anonymous distributed login system
  3. Outdated repository. The current repository being developed is: https://github.com/arnaucode/darkID
  4. ### Warning! Academical version. Outdated repository.
  5. This 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.
  6. Also this version is not finished.
  7. A new version of this project, being developed using libaries and Ethereum network, is in https://github.com/arnaucode/darkID
  8. ### Main concept
  9. The 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).
  10. ![screenshot](https://raw.githubusercontent.com/arnaucode/blockchainIDsystem/master/documentation/screenshot01.png "screenshot")
  11. ![screenshot](https://raw.githubusercontent.com/arnaucode/blockchainIDsystem/master/documentation/screenshot02.png "screenshot")
  12. ## How it works?
  13. #### Network infrastructure
  14. ![network](https://raw.githubusercontent.com/arnaucode/blockchainIDsystem/master/documentation/blockchainIDsystem-network.png "network")
  15. There are different types of nodes:
  16. - peers
  17. - the peers of the p2p network that runs the blockchain
  18. - serverCA
  19. - 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.
  20. - Have the webapp (frontend) to validate peers through a GUI interface
  21. - The GUI frontend webapp allows also to view the current peers of the network and the blocks of the blockchain
  22. - server-ID-signer
  23. - The server where the user creates a non anonymous account
  24. - Also is the server that blind signs the Anonymous ID of the users
  25. - Have the webapp (frontend) to interact through a GUI interface
  26. #### Step by step process
  27. 1. Once all the nodes of the network are running, a new user can connect to the server-ID-signer.
  28. 2. The user registers a non anonymous user (using email, phone, password, etc), and performs the login with that user
  29. 3. The user, locally, generates a RSA key pair (private key & public key)
  30. 4. The user blinds his Public-Key with the server-ID-signer Public-Key
  31. 5. The user's Public-Key blinded, is sent to the server-ID-signer
  32. 6. The server-ID-signer Blind Signs the Public-Key blinded from the user, and returns it to the user
  33. 7. 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
  34. 8. The user sends the Public-Key blind signed to the p2p network
  35. 9. 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
  36. 10. Then, when the user wants to login into a platform, just needs to put his Public-Key
  37. 11. The platform goes to the Blockchain, to check if this Public-Key is registered in the blockchain
  38. 12. 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
  39. ##### RSA encryption system
  40. https://en.wikipedia.org/wiki/RSA_cryptosystem
  41. - Public parameters: (e, n)
  42. - Private parameters: (d, p, q, phi, sigma)
  43. - Public-Key = (e, n)
  44. - Private-Key = (d, n)
  45. - Encryption:
  46. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/fbfc70524a1ad983e6f3aac51226b9ca92fefb10 "rsa")
  47. - Decryption:
  48. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/10227461ee5f4784484f082d744ba5b8c468668c "rsa")
  49. ##### Blind signature process
  50. https://en.wikipedia.org/wiki/Blind_signature
  51. - m is the message (in our case, is the Public-Key of the user to be blinded)
  52. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/a59b57fa153c8b327605672caadb0ecf59e5795a "rsa")
  53. - server-ID-signer blind signs m'
  54. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/e726b003ff1649f9254032cffae42d80577da787 "rsa")
  55. - user can unblind m, to get m signed
  56. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/e96fad0e1d46ec4c55986d1c8fc84e8c44259ecc "rsa")
  57. - This works because RSA keys satisfy this equation
  58. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/d6bd21fb4e25c311df07b50c313a248d978c3212 "rsa") and this ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/c13170a26e031125b417f22644fb64384c04eea7 "rsa")