Coder Social home page Coder Social logo

takukitamura / verimqtt Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 11.21 MB

verimqtt, a formally verified mqtt library written in F*.一定の条件下であればバグがないMQTT実装。

License: Apache License 2.0

Makefile 1.61% F* 73.87% C 9.50% Python 11.96% Shell 1.67% Rust 1.04% HTML 0.35%
mqtt fstar verification smt security formal-verification formal-methods verimqtt kremlin

verimqtt's Introduction

Verimqtt

検証済みのセキュアな MQTT 実装

dependency

work

MQTT の PUBLISH, CONNECT, DISCONNECT パケットのセキュアなパースに対応.

セキュア・・・ここでは C 言語プログラムのメモリ安全性が保証されており, かつ, MQTT が満たすべき制約(仕様)を F*言語により記述しておりその仕様を少なくても満たす

$ git clone https://github.com/TakuKitamura/verimqtt.git
$ cd verimqtt/src/mqtt-packet-parser
$ make
$ ./mqttPacketParser.out bin/connect/connect_all/connect_all.bin # CONNECT パケットのパース例
data.message_type = 0x01
data.message_name = CONNECT
data.flags.flag = 0x00
data.flags.dup_flag = 0xff
data.flags.qos_flag = 0xff
data.flags.retain_flag = 0xff
data.remaining_length = 114

data.connect.protocol_name = MQTT
data.connect.protocol_version = 5
data.connect.flags.connect_flag = 0xc6
data.connect.flags.user_name = 0x01
data.connect.flags.password = 0x01
data.connect.flags.will_retain = 0x00
data.connect.flags.will_qos = 0x00
data.connect.flags.will_flag = 0x01
data.connect.flags.clean_start = 0x01
data.connect.keep_alive = 0x3c
data.connect.connect_id.utf8_string_length = 10
data.connect.connect_id.utf8_string_value =
 [0x63, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74, 0x5F, 0x69, 0x64]
data.property.payload_start_index = 74
data.connect.will.connect_will_property.property_id = 3
data.connect.will.connect_will_property.property_type_id = 4
data.connect.will.connect_will_property.property_type_struct.utf8_encoded_string_struct.utf8_string_length = 17
data.connect.will.connect_will_property.property_type_struct.utf8_encoded_string_struct.utf8_string_value =
 [0x77, 0x69, 0x6C, 0x6C, 0x5F, 0x63, 0x6F, 0x6E, 0x74, 0x65, 0x6E, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65]

data.connect.will.connect_will_topic_name.utf8_string_length = 10
data.connect.will.connect_will_topic_name.utf8_string_value =
 [0x77, 0x69, 0x6C, 0x6C, 0x5F, 0x74, 0x6F, 0x70, 0x69, 0x63]
data.connect.will.connect_will_payload.binary_length = 12
data.connect.will.connect_will_payload.binary_value =
 [0x77, 0x69, 0x6C, 0x6C, 0x5F, 0x70, 0x61, 0x79, 0x6C, 0x6F, 0x61, 0x64]


data.connect.user_name.utf8_string_length = 4
data.connect.user_name.utf8_string_value =
 [0x75, 0x73, 0x65, 0x72]
data.connect.password.binary_length = 8
data.connect.password.binary_value =
 [0x70, 0x61, 0x73, 0x73, 0x77, 0x6F, 0x72, 0x64]


data.property.payload_start_index = 41
data.property.property_id = 38
data.property.property_type_id = 7
data.property.property_type_struct.utf8_string_pair_struct.utf8_string_pair_key.utf8_string_length = 7
data.property.property_type_struct.utf8_string_pair_struct.utf8_string_pair_key.utf8_string_value =
 [0x63, 0x6F, 0x6E, 0x6E, 0x65, 0x63, 0x74]
data.property.property_type_struct.utf8_string_pair_struct.utf8_string_pair_value.utf8_string_length = 13
data.property.property_type_struct.utf8_string_pair_struct.utf8_string_pair_value.utf8_string_value =
 [0x75, 0x73, 0x65, 0x72, 0x5F, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79]

data.error.code=0
data.error.message=

verimqtt's People

Stargazers

 avatar

Watchers

 avatar  avatar

verimqtt's Issues

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.