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.

113 lines
7.0 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. # darkID: A proof of concept of an anonymous decentralized identification system based on blockchain
  2. Blockchain based anonymous decentralized ID system
  3. ( Full slides in: https://github.com/arnaucode/darkID/blob/master/darkID-presentation.pdf )
  4. ## 1.- Main concept
  5. The main idea behind darkID is to implement a proof of concept of a decentralized system that allows platforms to identify verified users, but ensuring their anonymity.
  6. The main point, is to ensure anonymity, but at the same time, allow users to verify their identity, to ensure that no fake accounts are being used.
  7. ## 2.- How it works
  8. - Verify the non anonymous ID of an user
  9. - Based on the: username, email, phone, ID card, etc
  10. - From a logged and verified user, generate an anonymous darkID (Public Key, and save the Private Key into the storage), and get that darkID signed by an authority (serverIDsigner), with high reputation, and without knowing what is signing, to ensure the anonymity of the user
  11. - Once the darkID (Public Key) is signed by an authority server, add the darkID to the blockchain (ethereum, or some other)
  12. - Use the darkID to authenticate in platforms (just need to point the darkID reference in the blockchain), and the platform will send a challenge to the user, to resolve it with the Private Key assigned to the darkID from the darkID desktop app.
  13. ```go
  14. type DarkID struct {
  15. ID string `json:"id"`
  16. PrivK string `json:"privK"` //path of the PrivK file
  17. PubK string `json:"pubK"` //path of the PubK file
  18. PublicKey string `json:"publicKey"`
  19. Date time.Time `json:"date"`
  20. Hashed []byte `json:"hashed"`
  21. UnblindedSig []byte `json:"unblindedsig"`
  22. Verified bool `json:"verified"`
  23. ServerVerifier *rsa.PublicKey `json:"serververifier"`
  24. SignerID string `json:"signerid"`
  25. BlockchainRef string `json:"blockchainref"`
  26. }
  27. ```
  28. ### 2.1.- Infraestructure
  29. ![network](https://raw.githubusercontent.com/arnaucode/darkID/master/documentation/darkID-network.png "network")
  30. #### 2.2.1.- serverIDsigner
  31. - The server where the user creates a non anonymous account
  32. - Also is the server that blind signs the anonymous ID of the users
  33. - This server must be a recognized authority, or based on some reputation system. As only the reliable serverIDsigner will be used by the users to trust their ID validation
  34. - The serverIDsigner, can be different servers, based on a public reputation, where the users trust the servers that their are using to verify their darkIDs.
  35. #### 2.2.2.- ethereum Smart Contract
  36. Where the darkID is stored. In this case, is a very simple smart contract.
  37. #### 2.2.3.- Desktop app
  38. An electron desktop app implemented in Angularjs and Go lang.
  39. ![screenshot](https://raw.githubusercontent.com/arnaucode/darkID/master/documentation/darkID-screenshot01.png "screenshot")
  40. ![screenshot](https://raw.githubusercontent.com/arnaucode/darkID/master/documentation/darkID-screenshot02.png "screenshot")
  41. ![screenshot](https://raw.githubusercontent.com/arnaucode/darkID/master/documentation/darkID-screenshot03.png "screenshot")
  42. ### 2.2.- Step by step process
  43. - Once all the nodes of the network are running, a new user can connect to the serverIDsigner.
  44. - The user registers a non anonymous user (using email, phone, password, etc), and performs the login with that user
  45. - The user, locally, generates a RSA key pair (private key & public key)
  46. - The user blinds his Public-Key with the serverIDsigner Public-Key
  47. - The user's Public-Key blinded, is sent to the serverIDsigner
  48. - The serverIDsigner Blind Signs the Public-Key blinded from the user, and returns it to the user
  49. - The user unblinds the Public-Key signed by the serverIDsigner, and now has the Public-Key Blind Signed by the serverIDsigner
  50. - The user sends the Public-Key blind signed to the p2p network
  51. - The peers verify that the Public-Key Blind Signed is correctly signed by the serverIDsigner, if it is, they add the Public-Key to the Ethereum Blockchain, inside a new block
  52. ![creation](https://raw.githubusercontent.com/arnaucode/darkID/master/documentation/darkID-creation.png "creation")
  53. - Then, when the user wants to login into a platform, just needs to put his Public-Key
  54. - The platform goes to the Ethereum Blockchain, to check if this Public-Key is registered in the blockchain
  55. - 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
  56. ![login](https://raw.githubusercontent.com/arnaucode/darkID/master/documentation/darkID-login.png "login")
  57. The user Private Keys are stored only in the user local directory 'darkID/keys'.
  58. ## 3.- Cryptography
  59. ### 3.1.- RSA encryption system
  60. https://en.wikipedia.org/wiki/RSA_cryptosystem
  61. - Public parameters: (e, n)
  62. - Private parameters: (d, p, q, phi, sigma)
  63. - Public-Key = (e, n)
  64. - Private-Key = (d, n)
  65. - Encryption:
  66. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/fbfc70524a1ad983e6f3aac51226b9ca92fefb10 "rsa")
  67. - Decryption:
  68. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/10227461ee5f4784484f082d744ba5b8c468668c "rsa")
  69. ### 3.2.- Blind signature process
  70. https://en.wikipedia.org/wiki/Blind_signature
  71. - m is the message (in our case, is the Public-Key of the user to be blinded)
  72. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/a59b57fa153c8b327605672caadb0ecf59e5795a "rsa")
  73. - serverIDsigner blind signs m'
  74. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/e726b003ff1649f9254032cffae42d80577da787 "rsa")
  75. - user can unblind m, to get m signed
  76. ![rsa](https://wikimedia.org/api/rest_v1/media/math/render/svg/e96fad0e1d46ec4c55986d1c8fc84e8c44259ecc "rsa")
  77. - This works because RSA keys satisfy this equation
  78. ![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")
  79. ## 4.- Conclusions
  80. - This is just a proof of concept, as an extra [project in a university small subject](https://github.com/arnaucode/darkID/blob/master/darkID-presentation.pdf). Is not a full finalized project.
  81. - Cryptographic [blind signature](https://en.wikipedia.org/wiki/Blind_signature) is very powerful, and also, can be combined with [homomorphic encryption](https://en.wikipedia.org/wiki/Homomorphic_encryption) properties, to make secure and anonymous systems.
  82. - In this proof of concept, the smart contract integration is not finished, and is using ethereum Smart Contracts, but can be implemented using any other blockchain technology. At the beginning [I tried to implement a complete p2p network and a blockchain from scratch](https://github.com/arnaucode/blockchainIDsystem) (but was not a good idea having a short amount of time).
  83. - A decentralized anonymized login system over blockchain, can have lots of applications for example, can be useful to authentication for centralized and decentralized platforms, for voting systems, for health systems, for exchanges, for anonymous reputation systems, etc.