通過ICMP實現加密的P2P聊天:cryptochat

ygp8 9年前發布 | 9K 次閱讀 安全相關 cryptochat

加密的(查看cryption.js,當前使用 crypto 模塊的AES-256-CTR) P2P加密基于ICMP 使用 ping 請求。

$ sudo cryptochat <ip> <encryption_key>

If it doesn't work, it is probably because either your computer or your router is somehow blocking external ICMP requests.

Install

Make sure you have node0.10.x(tip: use n) and then install the package globally withsudo.

sudo npm install -g cryptochat

ICMP Echo request format

bits 0-7 bits 8-15 bits 16-31
type = 0 code = 0 header checksum
identifier sequence number
payload

The message data is attached as the ICMP payload.

Message

Messages are piped fromstdinand split into payload packages, which are encrypted separately and sent as ICMP Echo requests.

bits 0-15 bits 16-31
identifier =0x6363 message length
message

An "end" request is sent in order for the receiver to know when a message is completed. The end request has the following format:

bits 0-15 bits 16-31
0x6363 0x0010
0xffffffffffffffff

When the end request is received, the full message is decrypted and printed to the screen.

Contribute

As always, contributions are much appreciated.

項目主頁:http://www.baiduhome.net/lib/view/home/1441426755831

 本文由用戶 ygp8 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!