bitshares / bitshares/bsips

BSIP-SIGNED-MESSAGE

Open
#158 17 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
59
Forks
86
PR merge metrics
No merged PRs in 30d

Description

BSIP: SIGNED-MESSAGE
Title: Signed Message
Authors:
Stefan Schießl
Fabian Schuh
Status: Draft
Type: Informational (Client Protocol)
Created: 2019-04-03
Discussion:

# Abstract
This is an informal BSIP to define the format of a signed message to establish a common format.

# Specification

## Raw String Version 1
Plain String version with header and footer, similar to PGP message. Everything is a string, thus no quotation marks are present.

```
-----BEGIN BITSHARES SIGNED MESSAGE-----

-----BEGIN META-----
account=
memokey=
block=
timestamp=
-----BEGIN SIGNATURE-----

-----END BITSHARES SIGNED MESSAGE-----
```
| Variable | Description |
|---|---|
| `user_message` | Message defined by the user |
| `account_name` | Account name linked to the memo public key |
| `public_key` | Any public key that is linked to the account and can be used to verify the signature |
| `head_block_no` | Last irreversible block number at the time of signing |
| `datetime_string` | Datetime formatted as a String (`Date.toString()`) |
| `signature` | Signature of the payload |

The string payload for signing is
```

account=
memokey=
block=
timestamp=
```
represented as a string with visible characters
```
\naccount=\nmemokey=\nblock=\nhead_block_no>\ntimestamp=
```

### Example
```
-----BEGIN BITSHARES SIGNED MESSAGE-----
This is an example!
-----BEGIN META-----
account=sschiessl
memokey=BTS7zbtyYBnGAc4W4Kh9C1GKQZx51NGvJxEE17MXh3PadtD492VLw
block=36267739
timestamp=Wed, 03 Apr 2019 21:15:02 GMT
-----BEGIN SIGNATURE-----
2005fe3be3a436e8eb98fbfdef6277f38174ad8bd771fd9bb03468c340dbce7eff7b5579e34f3dc00074f33c46020b629e9d1f965e56fcb5972ef32910e4aed760
-----END BITSHARES SIGNED MESSAGE-----
```

## JSON Version 1
Represented as a dictionary, a signed message in JSON Version 1 looks like
```
{
payload: [
"from",
,
"key",
,
"time",
,
"text",

],
signature:
}
```
| Variable | Description |
|---|---|
| `user_message` | String | Message defined by the user |
| `account_name` | String | Account name linked to the memo public key |
| `public_key` | String | Any public key that is linked to the account and can be used to verify the signature |
| `timestamp` | Double | Unix timestamp |
| `signature` | String | Signature of the payload |

The string payload for signing is
```
'["from",,"key",,"time",,"text",]'
```
which corresponds to the stringified version of the JSON payload defined previously.

### Example
```
{
"payload": [
"from",
"sschiessl",
"key",
"BTS7zbtyYBnGAc4W4Kh9C1GKQZx51NGvJxEE17MXh3PadtD492VLw",
"time",
1554364619,
"text",
"This is an example!"
],
"signature": "2005fe3be3a436e8eb98fbfdef6277f38174ad8bd771fd9bb03468c340dbce7eff7b5579e34f3dc00074f33c46020b629e9d1f965e56fcb5972ef32910e4aed760"
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue itself contains the BSIP-SIGNED-MESSAGE draft, including Raw String Version 1 and JSON Version 1; start by reading those sections and the 17-comment discussion. Done means a decided, internally consistent signed-message specification is recorded or the proposal is superseded.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain
Domain
blockchain, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.