<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">FYI, OCaml has great, imo the best, primitives (modules, functors, etc.) to build modular/swappable software.<div class=""><br class=""></div><div class="">If you need a case-study, there’s this excellent paper by CMU’s Fox project about building more complex layered network protocols in SML by leveraging the power of functors: [url: <a href="http://www-2.cs.cmu.edu/Groups/fox/papers/lfp-signatures.ps" class="">http://www-2.cs.cmu.edu/Groups/fox/papers/lfp-signatures.ps</a> | md5: faf082f1f13bba60bd966c23a22c2856].</div><div class=""><br class=""></div><div class="">Note that SML is OCaml’s ancestor. The concepts and the approach are nonetheless relevant to what you’re trying to achieve.</div><div class=""><div class=""><br class=""></div><div class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Oct 10, 2017, at 19:14, Nazar Mokrynskyi <<a href="mailto:nazar@mokrynskyi.com" class="">nazar@mokrynskyi.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class=""><p class="">Great suggestions and thanks for reading it!</p><p class="">This is the first time me writing some sort of protocol for wider
use, so I'm just learning how to do it.<br class="">
</p><p class="">Specification document is now reduced in size and
<a class="moz-txt-link-freetext" href="https://github.com/nazar-pc/ronion/blob/master/design.md">https://github.com/nazar-pc/ronion/blob/master/design.md</a> is added
with design overview and some diagrams, hopefully it makes more
sense this way.<br class="">
</p><p class="">Security and anonymity properties of the protocol are largely
influenced by crypto in use and the way intermediate hops (nodes)
are selected, so the framework should just combine them in
non-vulnerable way, which is why I don't think it is appropriate
to talk about anonymizing quantitatively here (changed the wording
in design document to reflect this).<br class="">
</p>
<pre class="moz-signature" cols="0">Sincerely, Nazar Mokrynskyi
<a href="http://github.com/nazar-pc" class="">github.com/nazar-pc</a></pre>
<div class="moz-cite-prefix">On 10/10/17 2:48 PM, Ximin Luo wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:c42a5f9a-329d-2dfd-b302-68c850ef3c99@pwned.gg" class="">
<pre wrap="" class="">A specification is a document for implementors, after the ideas it implements have already been well-tested and proven. And looking at your text, that's what it's written from the perspective of - instructions on how to write code. However this sort of text is less suitable for reviewers to read, to check that the ideas are sound security-wise.
It would be good to produce a more high-level document that describes (1) how the protocol works, i.e. the abstract purpose of each packet being sent/received and of any subroutines of the protocol, as well as the security properties you're (2.a) assuming from lower layers and (2.b) are providing to higher layers.
There is a "goals" and "assumptions" section, which starts to answer (2.a) and (2.b), however the rest of the document doesn't explain how each step of the protocol achieves these goals and uses these assumptions. Also these could be filled out in detail a bit:
- "The only assumption about transport layer is that it delivers data in the same order as the data were sent" - You can't simply assume this, because it's not secure. Granted, most crypto schemes implicitly have some level of ordering guarantee. However, you have to specify that (it was not clear to me if you did). For example, naive EBC-like encryption where you encrypt+auth each packet the same way doesn't work, you have to include a counter in there somewhere, or some other order-preserving measure <b class="moz-txt-star"><span class="moz-txt-tag">*</span>inside<span class="moz-txt-tag">*</span></b> the authentication.
- "anonymizing the connection" - Could you define "anonymizing" more quantitatively? There are various definitions in various research papers that are all publicly available and easy to find.
- "hiding exact number/size" - many attacks vs anonymity don't need the exact number or sizes of anything, they build up a probability distribution based on what they've observed.
X</pre>
</blockquote>
</div>
_______________________________________________<br class="">Messaging mailing list<br class=""><a href="mailto:Messaging@moderncrypto.org" class="">Messaging@moderncrypto.org</a><br class=""><a href="https://moderncrypto.org/mailman/listinfo/messaging" class="">https://moderncrypto.org/mailman/listinfo/messaging</a><br class=""></div></blockquote></div><br class=""></div></div></div></body></html>