Philip Beadle
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
      • No invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
No invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# DPKI - Distributed Public Keys > ## Key Management // Identity and Identity Recovery ----------- **First piece of three Holochain identity services.** 1. **DPKI** does key management for actually ensuring continuity of control of your keys and source chain. 2. **Personas** lets you control your identity data and provide profile mappings to allow selective and revokable access to your data 3. **Validation/Assertions/Trust Graph** enables collection of third party validation or assertions about identity and reputation. -------- ## User Seed and Key Generation ### Registration of User Seed and Master Keys on the DPKI (occurs during Holochain Installation): ## Types of Seeds: >- Revocation Seed (RevSeed) >- Generator Seed (GenSeed, Master ID Seed) ## Levels of Keys: >- Revocation Keys : Directly created from the RevSeed ```mermaid sequenceDiagram Participant DHT Participant User Local Chain Participant HIP44 Participant DPKI Participant User DPKI -->> User : Request Registration User -->> DPKI : genEntropy() DPKI -->> User : Request Password User -->> DPKI : genPassword() DPKI -->> HIP44 : Provide Password HIP44 -->> HIP44 :genRevSeedMnemonic(entropy) (24 words) HIP44 -->> HIP44 :genRevSeed(password, mnemonic) HIP44 -->> DPKI :Returns RevSeed and RevSeedMnemonic HIP44 -->> HIP44 : makeHash(RevSeedMnemonic) HIP44 -->> HIP44 : pick word from RevSeedHash via modulo DPKI -->> User : Provides RevocationSeedMnemonic to User HIP44 -->> HIP44 :genIdMasterSeed(revocationSeed) HIP44 -->> User Local Chain : Returns IdMasterSeeds(revocationSeed) User Local Chain -->> User Local Chain : Store IdMasterSeeds(revocationSeed) HIP44 -->> HIP44 : genIdKeys(app) HIP44 -->> DPKI : Returns Public Keys for app Note over DPKI : Store Master Keys in the local chain DPKI -->> DHT : Publish Public Key and to DHT (Header) ``` ## Registration of new dApp on the DPKI **Decision to be made:** - Where and when is the registration called ? - [ ] During app installation - Will need to work with core - [ ] After app installation : - Passing parameters ```mermaid sequenceDiagram Participant HIP44 Participant DPKI Participant dApp dApp -->> DPKI : Request to register(APP.DNA.HASH,dApp.Agent.HASH) DPKI -->> HIP44 : registration(APP.DNA.HASH,dApp.Agent.HASH) HIP44 -->> HIP44 : registerApp() NOTE over HIP44 : if the dApp_Type is registered check if the APP_Account is registered too. if not create a new APP_Account. if the app is not registered create a new dApp_Type ``` -------- ## Types of Package(s): - HIP44: This is our cryptography tool package for generating RevSeeds and GenSeeds and their corresponding Priv/Pub. Key Pairs. -------- ## Gossip Identity Verification Process: Primary Revocation Key (48 words) >> generate 1.) Master Revocation Key and 2.) Master Identity Seeds ("GenSeeds", of 12 words each) Set a Revocation Method for each particular key. Updating Key Revocation method. >- For any change in the revocation >Instructions on how to choose ppl. >- Email, >- Call, >- Skype, etc. ## N(M) Process: >- M friends are asked to sign the user's identity (their agent key) >- At the time of the revocation, user contacts the M friends to request the revocation >- At least N(M) friends then need to create revocation request to the user's DPKI >- Once N(M) friend hashs/agent keys have been received (that match the M number who originally signed the agreement to be the M users and attest to the user's identity at the time of the N(M) request) then new keys generated and pointed assigned. ## Indentification Process ### Need : To verify if the Agent is the same as the agen on the other app - verifyAgents() - valadateAgent() ```mermaid sequenceDiagram Participant DPKI Participant App ``` ## Other notes on Identity: - ADR - Key/Identity Management (https://hackmd.io/VIVvRD9gQ5KnDy_C-y6leA) ## Revoking a Key ### Lost Key ### Compromised Key ### Getting a new Key ## Explained: Using a key in HoloChat ## DPKI Components - Revocation/Acceptance of new keys - Select Default Method: - Rev Key / Rev Authority / M of N Sigs ```mermaid sequenceDiagram Participant AppUI Participant AppDNA Participant DPKI_UI Participant DPKI_DNA AppUI->>AppDNA:d ``` - Override default method for a specific app - Bridging from/to a holochain app - Register a public DPKI key in ID string for an app - Proof of control of private key: - Run DPKI locally - get(PubKeyHash) via DPKI API bridge to get the full key - Encrypt(message, key) - Bridge Call to DPKI with result=echo(encryptedMessage) - check result =initial message before encryption ```mermaid sequenceDiagram User -->> KeyMgtApp: ask for KeyMgtApp.App.Key.Hash KeyMgtApp -->> User: KeyMgtApp.App.Key.Hash Note over User: {"KeyMgtApp":"KeyMgtApp.App.DNA.Hash", "KeyRevocationAuth": KeyMgtApp.App.Key.Hash} Note over User: Stored as AgentId in chain and dht User ->> NewApp: Initialise Note over NewApp,KeyMgtApp: In Genesis code of NewApp call bridge to getGenesisPublicKey(). Uses KeyMgtApp App.Key.Hash NewApp-->>KeyMgtApp: Get Public Key KeyMgtApp-->>NewApp: Public Key Note over KeyMgtApp: Default Revocation method stored in KeyMgtApp NewApp -->> KeyMgtApp: Get default Revocation Method (linked from pubkey hash) Note over KeyMgtApp: Message is signed using private key KeyMgtApp -->> NewApp: Replies with Signed message or false if no default method NewApp->>NewApp: If false or if verifySignature(message,signature,pubkey) fails, throw error/return false in genesis Note over NewApp,KeyMgtApp: Error: "Invalid KeyMgtApp Key. Cannot confirm control of correlated private key." ``` - Unify identities across devices - Bind to HC identity services - "Proof" of key control across HC apps - Hold/reveal Assertions/Claims/Fields - Seed & HD keys - "Proof" of legacy identity services (email, FB, Twitter, github, google, phone, etc.) - OAuth provider for legacy web -------- ## Notes from the meeting (29/6) We discussed the importance of user experience and how a well designed process can ensure the majority of users has good security and recovery protocols set up be default. **(node damaged or destroyed)** To do this we imagined using a key generation algorithm **(BIP39?)**. This would allow a user to securely record and store a key phrase which can be used to regenerate their public/private key pairs. This would allow a user who lost their private key to recover it and resume using their apps. **(node stolen by bad agent)** It was discussed that this same key phrase could be used to generate revocation key pairs stored inside DPKI. This would allow a user posessing the key phrase to not only recover their app private keys but also revoke them to prevent a bad agent in possession of their device from permanently taking controll. Finally we considered how to structure the communications between DPKI and a users apps. The main concern was that if a bad agent were to temporally take control of a users node they could use DPKI to discover all the apps which they are a part of. (Art explained why this is a bad scenario). If the bridging calls go from DPKI to the peripheral dApps this makes it much easier to revoke all keys in the case of a compromise. It has the downside of revealing all apps that are bridged. The alternative is that apps bridge TO DPKI. In this case a user must activate revokation from within all their apps, potentially 100s, but means their existance would not be revealed if DPKI was exposed. Another option we partially explored is using multiple instances of DPKI (with different keys generated from the seed phrase) to bridge to different apps thus limiting the potential information a hacker could gain. ### How to make the DPKI Experience More Friendly ? **( How to make Key managemnet compatable with humans ? How to make the user experience Smooth ? )** - Install Holochain - Push an option to to convince the user to set up the revocation key and revocation method (Leave 1 i.e. self revocation method). - Give the options of MofN when they have friends (Level 2) - Use tools that are know to people Like (Creating Seeds) to make it seem relatable and easy to understand - Use the **Revocation key Seed** to get the **Revocation method Seed** So that it has better security and less seed for the user to hold ### After the revocation (How can you change the Keys ?) **NOTE : We don't send the private key over the wire.** - Can't pass the keys over the wire ? - Have the installer hcd get the new keys and Install the app ### How to Sync Two same apps are the same person - ?? - KeyGen should be a System level function (So you dont have to generate and then pass it over the wire) ### Other random things I remember - Membranes based on level of security/recover implemented - M choose N would be a good way to incentivise users to get their peers to install Holochain - Revocation private keys could be generated and stored in existing hardware wallets that follow the BIP39 standard --------- ## Notes from the meeting (3/7) Had more clarification on the proposed ADR for Identity and Key Management - https://hackmd.io/VIVvRD9gQ5KnDy_C-y6leA -------

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Upgrade to Prime Plan

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare with
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully