https://github.com/maymeow/verifier
MinSig provides a decentralized and secure way to create, verify, and manage claims using cryptographic signatures and key attestations.
https://github.com/maymeow/verifier
claim cryptography decentralized php verification
Last synced: 9 months ago
JSON representation
MinSig provides a decentralized and secure way to create, verify, and manage claims using cryptographic signatures and key attestations.
- Host: GitHub
- URL: https://github.com/maymeow/verifier
- Owner: MayMeow
- Created: 2025-04-04T13:58:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-09-02T11:32:41.000Z (10 months ago)
- Last Synced: 2025-09-17T10:01:11.674Z (9 months ago)
- Topics: claim, cryptography, decentralized, php, verification
- Language: HTML
- Homepage: https://claims.maymeow.dev
- Size: 147 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: Readme.jp.md
Awesome Lists containing this project
README
# MinSig: 公開鍵を用いた所有権の証明ツール
> [!CAUTION]
> このツールは、公開鍵を用いた所有権証明の初期アルファ版デモです。テストと探索のみを目的として提供されており、本番環境での使用は推奨されません。仕様は変更される可能性があり、ご自身の責任においてご利用ください。
MinSigは、ブラウザ上で動作する軽量なツール(オプションでPHPバックエンドを搭載)で、公開鍵暗号技術を用いて署名された主張(クレーム)を生成および検証します。
このツールを使用すると、以下のことができます:
- 🔐 ブラウザ上でRSAキーペアを生成し、保存する
- ✍️ 署名付きのデジタルクレーム(所有権、メンバーシップ、身元確認などの主張)を作成する
- 🧾 Base64またはJSON形式で署名付きのクレームバンドルをダウンロードする
- 🔍 公開鍵暗号技術を用いて、クレームの真正性を検証する
このツールは、ポータブルで検証可能な形式で、メッセージや声明の所有権または作者の証明が必要な場合に最適です。
## 使用例
- ドメイン、アプリケーション、アカウントの所有権を証明する
- 暗号化されたアテステーションまたは証明書を発行する
- 分散型または相互運用型システムで身元を検証する
- 他のアプリケーションに検証可能なクレームを埋め込む
- 自身のクレームをレポジトリに保存する
- `claim=claim:64fc94e2@github.com/yuna/claims`
Base64文字列での検証を可能にする `claim.json` またはクレームIDでシンプル `claim:64fc94e2@github.com/yuna/claims` のようにすることで、誰でもすべてのクレームを単一のレポジトリに保存できます。これは、メタタグ `` やDNS、App Manifestで使用するのに便利です。
誰でも自分のレポジトリにクレームを登録して所有権を証明できます。
## 署名の形式
```json
{
"claim": {
"id": "lz628BlfMsVdOXvaub+dCKcChbLheaudPYkRBbI3Ae4=", // claim id in base64, filenames are using hex notation
"version": "1.1",
"type": "ownership-claim",
"subject": "maymeow/app-store",
"message": "I, MayMeow, claim ownership of the GitHub project above.",
"timestamp": "2025-04-05T16:37:03Z"
},
"signature": "ReDTcD5QzE60HACIZzD/rg...t8=",
"publicKey": "MIICI...8CAwEAAQ==",
"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIC...Q==\n-----END PUBLIC KEY-----\n",
}
```
## DNSへのクレームの登録
Swiftコードを使用します:
```bash
claim:{{ claim_id_in_hex }}@{{ url_to_claim }}
# claim:cc59e45d39a6f44552470d7a44149a28e7c02d92e69363a9294b21d50da9d138@github:maymeow/claims
# claim:cc59e45d39a6f44552470d7a44149a28e7c02d92e69363a9294b21d50da9d138@mydomain.tld
# claim:identity@codeberg.org/maymeow/claims
```
`{{ claim_id }}.claim.json` ファイルをインターネットからアクセス可能な場所に保存します
```bash
# TXT Record _claim.domainname.com With content
claim:cc59e45d39a6f44552470d7a44149a28e7c02d92e69363a9294b21d50da9d138@github:maymeow/claims
claim:cc59e45d39a6f44552470d7a44149a28e7c02d92e69363a9294b21d50da9d138@url:mydomain.tld
```
```bash
claim:d2113ed048caa66efd26565d3a6b0ebe80587edce8f28263dcbff5c7867ca345@codeberg:maymeow/claims
```
`{{ server_url }}/.well-known/{{ claim_id }}.claim.json` を参照します。
## 公開鍵の登録
他の人があなたの鍵を見つけられるようにするには、Swiftコードを使ってパスに鍵を配置し `.keys` フォルダに配置します。 `public_key_{{ key_id }}.txt` を公開しないでください。 サービスは承認されていないリクエストをブロックするため、認証されていないリクエストが送信される可能性があります。
```bash
key-id:64905ab2ecf4ca4f9003f3e70e28d4d36fe2def2884734bb1dc1889a0e5ba5ec@your-domain.tld
```
## メタタグへのクレームの登録
```html
```
## URLs
ウェブサイトのリンクにクレームを含めるには、URLに安全なエンコードされたSwiftコードを作成する必要があります。 `urlencode.php` ファイルをリポジトリのルートに保存します。
リンクは次のようになります。
```bash
http://localhost:8000/swift?q=Y2xhaW06ODNhODg3YjU1YjkwOTNmYTBjMDEzYzFiM2U2MTYyODNiMWMyNmJiMGQzMGI5ZmM0YzI3ZWZiNzAyYjQxZDk3M0BnaXRodWI6bWF5bWVvdy9jbGFpbXM%3D
```
ローカルホストでサーバーを実行した場合、ウェブサイトの検証が成功するかどうかを確認できます。
## Githubリポジトリ
クレームファイルをリポジトリのルートに保存します。例えば `.claim.json` または `.claims/claim-name.claim.json`. フォルダを使用します。
When you want use your repoisotry as a storage for your claims put them into `.well-known/{{ claim_id_in_hex }}.claim.json`
## 目的と活用方法
- **主張(クレーム)の作成**: 何かの所有権や所属を証明するための主張を作成します。
- **オープンソースで使いやすいツール**: オープンソースであり、CLI(コマンドラインインターフェ
- **DNSへの登録**: DNSレコード (`_claim.domain.tld`) にクレーム情報を登録し、ウェブページで `` や `rel="claim"` などのメタタグにクレーム情報を関連付けます。
- **分散型アーキテクチャ**: クレームには署名と公開鍵を含め、分散型アーキテクチャをサポートします。
- **ユーザーによるレポジトリホスティング**: ユーザーがGitHubやウェブ上の任意のストレージに自身のクレームレポジトリをホスティングできるようにします
## More to come
- Derive key fingerprints: hash the public key (e.g. SHA256) to use as an identity hash.
- QR code generator with embedded claim
- Consider offline key for master identity, Use one key to sign sub-identity keys (a mini Web-of-Trust)
## How i can provide connection between owner and key?
In current state You can place keys into reposiotory, dns and meta tags as a reference to your storage. The verifier will check signature and tell thats if it is valid or no.
How to providfe connection? "web-of-trust"?
## プロキシ
CORS(クロスオリジンリソース共有)を許可されないサービスが存在する問題に対処するため、プロキシを実装しました。
当初は、シンプルかつ分散型の仕組みを目指していましたが、現時点ではプロキシをホストするか、私の環境を利用する必要があります。後ほどドキュメントとDockerイメージで対応する方法を追加します。
フロントエンドに関しては、GitHub PagesやVercelなど、一般的なホスティング環境であれば問題なく動作します。
CORS問題を回避するために、プロキシをフロントエンドに組み込む方法や、CORS設定を無効にする方法が存在しましたが、いずれも推奨されません。特に後者の方法は危険であるため、安全性を確保し、ブラウザの設定を変更しないため、シンプルにプロキシを導入するのが最良の選択肢となります。
## From start to end
- Created php CLI
- Verifier that can verify json files
- added option to verify base64
- added claim reference (Swift codes) that can be applied on sites, dns, etc
- discused how to add relationship between key and owner
- added support for master-keys and subkeys
- added key-attestation-claim
- added option to fetch claim from SWIFT code
- find that some blocked requests with CORS
- added proxy with php
- find that the proxy can be used to ddosing because of lack of authorizadion and so it need to be protected or not hosted public
- discused rate limiting
- considering to make docker for frontend and backend (this stop me from first idea to host this system just on static sites)
- discusing to use Redis (again it is become more complex)
## Current state
- PHP cli for creating new claims
- Frontend javascript (verifier)
- Claim-Proxy (fetching claims)
- php-fpm
- Redis (?)
## Features
- CLI signing (PHP)
- JS browser signing and verifying
- allow to backup keys
- Verify json claims
- Verify base 64 claims
- fetch claims from url
- fetch claims from meta takgs
- fetch claims from dns
- allow selfhosting
- Docker is needed to allow host claims anywhere
- Badge that can be implemented on website
## 識別子の付与(オプション)
1. `identity-claim` を作成し署名します。
2. どこかにこのIDを公開します(例えば、GitHubリポジトリ)。
3. JSONファイルを開き、あなたのIDの内容をコピーします。
4. このIDをすべてのクレームの `identityClaimId` に設定します。
## 識別子の付与(オプション)
これはオプションの機能であり、単一のキーを使用することもできます。
1. マスターキーを作成します。
2. 別のキーを作成します。
3. `key-attestation-claim` を作成し、あなたの公開キーIDを件名として指定します。
# クレームとキーの公開
| ID | 用途 | 配置場所 |
| :--- | :--- | :--- |
| `key-id:{{ key_id }}@{{ source }}` | 公開鍵 | `.keys` |
| `claim:{{ key_id }}@{{ source }}` | ドメインレベルのクレーム | `.well-known` |
| `claim:claim@{{ source }}` | リポジトリレベルのクレーム | リポジトリのルート `.claim.json` or `.claims` (複数のクレームを 1 つのリポジトリに保存する場合) |
**注記**: この翻訳は、元のテキストの意図を反映するよう努めましたが、技術的な詳細や特定のフレーズにおいて若干の解釈が異なる可能性があります。