Code Monkey home page Code Monkey logo

diary's Introduction

Diary: A permanent and private on-chain diary book, powered by BSV.

As long as you control the private key, your on-chian diary book will never be lost or peeped by others.

>>> from diary import User
>>> private_key = 'Kzr6GbF9RpiuczdwJV9CS2STu9FvDfa7QPHRvx7zui51gxNxnTS3'
>>> user = User(private_key)
>>> diary1 = '''
... I have a super big secret and I want to write it on-chain.
... '''
>>> user.send_diary(diary1)
'30d58b9d7d9bbdd6d93d0096fba595054812010d65605c394723f853d4ca8cb7'
>>> diary2 = '''
... But I won't write it under this address because you already know the private key!
... '''
>>> user.send_diary(diary2)
'39382cddd129a6c359b516fda93f91c4753a13c8db5831f00d3623bc6ff3cbc0'
>>> user.print_diaries()
==============================
Blocktime: 2019-09-14 07:53:53
Txid: 30d58b9d7d9bbdd6d93d0096fba595054812010d65605c394723f853d4ca8cb7
Content:
I have a super big secret and I want to write it on-chain.


==============================
Blocktime: 2019-09-14 07:54:49
Txid: 39382cddd129a6c359b516fda93f91c4753a13c8db5831f00d3623bc6ff3cbc0
Content:
But I won't write it under this address because you already know the private key!

Here are the transactions. The data is encrypted by Elliptic Curve Integrated Encryption Scheme. https://whatsonchain.com/tx/30d58b9d7d9bbdd6d93d0096fba595054812010d65605c394723f853d4ca8cb7 https://whatsonchain.com/tx/39382cddd129a6c359b516fda93f91c4753a13c8db5831f00d3623bc6ff3cbc0

Planned improvements

  • Support advanced text format.
  • Support more encryption schemes.
  • Support a permission system. Each diary can be set to be only visible to your self, totally public or visible to certain group of people. For the last one, the key for decryption would be sent to your friends through an encrypted on-chain message, when the diary is sent.
  • Function of revealing the encrypted diary at some future time.

Credits

diary's People

Contributors

remem9527 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.