« first day (3400 days earlier)      last day (380 days later) » 

12:20 AM
posted on February 21, 2020 by Fork

Videos from Philadelphia are now online: https://2019.reb4.me/talks I think it's some pretty impressive stuff.  And it actually only scratches the surface of what's going on. Some notes on 2020 direction are on the forum: https://forum.rebol.info/t/foresight-in-2020-and-2019-retrospective/1258

 
 
2 hours later…
2:19 AM
posted on February 21, 2020 by nubie

this is my log1.txt file line0: header line1: aaaa line1: bbbb line1: cccc line2: ddd line2: eee this is my code Rebol [  ] log: read/string %log1.txt parse/all log [  some [   thru "line0:" copy msgLine0 to newline                        

 
 
2 hours later…
4:32 AM
If I didn't already mention it; the TLS protocol has a concept in it which is that there are "extensions" that you can put in your handshakes. The extension has a 2-byte code of which extension it is, then it has a size of how many bytes the data for the extension takes up. This means if you don't understand how to pick apart the bytes for that particular extension, "you can just skip it" and go along with the protocol.
Unfortunately this is how they've basically added on another layer to TLS 1.2 where it's the "same protocol" but you have to know about these new extensions to use ECHDE. So not really the "same protocol" any more.
Anyway, I'm back looking @ this after some non-Rebol-related tinkering today. I gather that some of these "out of band" protocols have been made more formal in TLS 1.3... though that just means there's a lot more #ifdef'ing if you're going to support more than one form of TLS.
 
5:29 AM
@MarkI This is pretty cool! illustrated TLS (Where was this when I was messing with TLS before?!)
2
 
 
7 hours later…
12:50 PM
Do we have documentation for libRebol? Where best to start to understand libRebol.
 
@iArnold The source is commented: github.com/metaeducation/ren-c/blob/…
As I said, I'd be willing to shuffle it up so that it uses the C99 rules for View, such that you don't need to use rebEND
@iArnold You can feel free to do so. Right before the #include "sys-core.h", put #define REBOL_IMPLICIT_END ... like this
(It's the default when you #include "rebol.h", but if your extension includes the core API...as all of them currently do in order to define natives...then it is not the default.)
 
@HostileForksaysdonttrustSE I do not recall using rebEND actively somewhere in the code I manipulated, so I figured I need to understand more of the concept liRebol.
 
@iArnold Concept is explained in the %a-lib.c I linked above, and most routines have some comments on them. It uses strings of code that you can splice values into. If you have a C quantity (like an int) you can't directly splice it, so there are value constructors like rebInteger(your_c_integer_here), but you will have to free those values. As a convenience, rebI() is something you splice in the evaluator that is freed once it's seen.
Routines that go the other way... e.g. to get a C integer out of a Rebol INTEGER!, are done in a clever way that mixes them with the evaluator. So you can write int c_integer_sum = rebUnboxInteger("1 +", rebI(some_other_c_integer)); for instance...and that just works without you having to worry about freeing any Rebol handles.
This would be more laborious if you had to say REBVAL *rebol_integer = rebValue("1 +", rebI(some_c_integer)); then int c_integer_sum = rebUnboxInteger(rebol_integer); then rebRelease(rebol_integer). Though you still can say that too.
But libRebol with its tricks lets you sidestep a lot of the grunt work of managing memory and handles; and when you start getting the hang of just how much you can do inside one call it's really kind of mindblowing.
 
1:11 PM
Thank you, will look at this after I finish up my R course at edx.
 
 
2 hours later…
2:41 PM
I seem to be stuck inside the C code. I want for example the code that is attached to the click event of a button to transfer control over to a Rebol code block.
 
@iArnold rebElide("loop 2 [print {This doesn't get you unstuck?}]");
 
That should make me happy again! :-D
 
 
2 hours later…
4:36 PM
@MarkI Given the "non-rocket-science nature of elliptic curves" :-/ maybe you can explain an aspect of this API to me. I am getting a public key in server key exchange for secp256r1 which has a 65 byte format. That's a format ID (0x04) and then a 32-byte X and a Y coordinate.
If you use secp256r1 then it says the ECC_BYTES is 32. And none of those APIs take as input 64-bytes-worth of X and Y. The only API that deals in [ECC_BYTES*2] gives an output of that size (signature).
A property of the elliptic curves--as with a plain old ellipse, I suppose--is that if you know the X you can get the Y, modulo the sign. But the sign is presumably important. So is that what is communicated by the ECC_BYTES + 1 sized parameter? e.g. this "easy-ecc" deals only in compressed-format keys where there's a sign-indicating byte on what is presumed to be an X-coordinate?
If I'm applying my imagination correctly to this, it means I need to either check the sign of the Y and encode it into a byte...or convince the server to send me the key already in that compressed form (?)
But it says in the RFC that the servers must implement the uncompressed format and may implement the compressed format; which suggests the more compatible option is to ask for uncompressed and then glue the extra byte on based on the Y-coordinate.
Okay, well I guess I could have just read the code. yes, it "decompresses" the key where it uses the first byte as the sign
 
 
2 hours later…
6:59 PM
Segmentation error memory dump made
to the gym now...
 
@iArnold If you are on linux, you will likely get more information if you redo your make settings to say debug: sanitize.
I think OS X clang supports it too.
 
7:17 PM
>> key: ecc-make-key
== make object! [
    public: make object! [
        x: #{BA4303B8ED5911BF5E8B1162CD7A8AEFA20F37F072AEA5FAE51D49E3E57A876D}
        y: #{4A478E04FDE3447976418DA387244FE221ADC0637FC635F2B2EA7D7596E5A4DA}
    ]
    private: #{06179F4C7359442355EB48583132181C4ED8BB0C2248495BFFC17EE05271CB4D}
]

>> ecdh-shared-secret key/public key/private
== #{A2F91161B119654854AA328E1C983D83FBC4F4C477F65013DA310EE94FACD8AC}
(Of course, encrypting your own public key with its paired private key is relatively nonsensical, but, there's hopefully proof of concept of having secp256r1...pretend it was someone else's.)
I wound up just lightly hacking up the easy-ecc API to offer entry points with uncompressed keys. Why not.
 
 
1 hour later…
8:37 PM
0
Q: What's the meaning of this binary sequence arriving at my http server?

Graham ChiuI'm running a http server written in Rebol and sometimes I see that the server is woken by data like this arriving at port 80 0300002F2AE00000000000436F6F6B69653A206D737473686173683D41646D696E697374720D0A0100080003000000 In the logs I see that over two days I've seen this happen three times. ...

 
9:07 PM
>> parse as text! read forum.rebol.info [thru <title> copy title to </title>] print title
AltRebol
@GrahamChiu Ren-C... now, 50% more elliptical. :-/
 
@HostileForksaysdonttrustSE how curvy is that?
 
Curvy enough to be doing a terrible job at security; we don't have much in the way of modern signature algorithms. So we just say "yeah, we'll trust you".
Doesn't make a whole lot of sense to get picky about it if you're not going to check a certificate chain in the first place.
 
@HostileForksaysdonttrustSE true
Sounds like you're on a roll
https server mode next?
 
clients can trust us
 
 
2 hours later…
10:49 PM
@GrahamChiu I don't recognise this, but is there any chance it's an HTTP/2 request?
 
@rgchris to text! bombs on it
 
HTTP/2 is a binary protocol.
 
@rgchris ah well, then I have no idea!
 
But the good news is that httpd has been stablised such that I've had no crashes now since the last update
 
10:52 PM
๐Ÿ˜€๐Ÿ‘๐Ÿ‘
 
I'd like to see some way of logging all the tcp traffic in a raw format
 
11:26 PM
TLS is gnarly in places but some of the %prot-tls code was just making it look a lot crazier. I cleaned more of it up some--on its way to being done with some kind of binary parse (we still haven't really nailed what such a tool needs, and I think we could). But jeez, just look at how it was for how simple what it was actually doing.
Instead of advancing a series position it just kept adding on the aggregate of all the offsets from the previous lines, you'd just see all these things everywhere... nutty.
I did something a bit weird with this GRAB where it's actually enfix and quotes the SET-WORD! on its left and assigns it itself... this way it can use the name of the variable it's setting in error messages. Which is a weird idea; not necessarily ideal, but a stopgap measure for having a better expression via dialect.
 
11:58 PM
@HostileForksaysdonttrustSE that made it very difficult to see where you were in the negotiation chain
But aren't any of those variable length?
 

« first day (3400 days earlier)      last day (380 days later) »