Live data from Hacker News

A TLS 1.3 stack written in Visual Basic 6

github.com

41–50 of 101 posts

Re: A TLS 1.3 stack written in Visual Basic 6

#41

This is glorious. I remember, fondly, my VB6 days in back office of a power company during my internship. I don’t think I’ve ever developed and delivered software faster than back then. It’s too bad the whole “RAD” thing isn’t a thing anymore.

It would have been cool to have a rad tool but for react and js as a whole. Writing it by hand is such a waste of time, at least for backoffice tools.

Re: A TLS 1.3 stack written in Visual Basic 6

#42

Would be great if operating systems implemented this stuff so every application doesn't need to. Every other internet protocol is built into the OS.

Windows and Apple does. Linux is typically exposed through OpenSSL or an OpenSSL equivalent library. The downside to the OS provided libraries is that you are at the mercy of what the OS provides. You need Server 2022 or a relatively new Windows 10 build to have TLS 1.3 available.

The Linux kernel exposes TLS but very few people actually use it. On some hardware it can make TLS significantly faster, but on beefier hardware I doubt you'll notice the improvement much. At the cost of rewriting your entire network stack, I don't think it makes sense for many tools to switch to it.

I'd argue that the Windows crypto system and openssl really aren't all that different, concept wise. In theory you can ship Linux without openssl but in theory you can remove the Windows cryptography library too if you remove all of its dependencies. In both cases you'll be left with a barebones system where only statically compiled tools can talk to the modern web.

Re: A TLS 1.3 stack written in Visual Basic 6

#43
post #29

Are there still working and available ide and compilers for vb6? Any open source ones? After working on vba for MSAccess for a few years I came to both appreciate and hate it. It’s fast, small in features compared to modern languages, but a pleasure to hack around and find ways to expand its capabilities. I made simple ORM with it, autogenerating classes from a database, went into the rabbit hole of modernising the d…

TheRasteri has a video on getting VB6 running on a modern system, it's not pretty: https://youtu.be/LVEsNUm04Sc

Re: A TLS 1.3 stack written in Visual Basic 6

#44
post #14

Earlier quoted context omitted.

Don’t tell anyone, but I still think we’ve been terrible at UIs since VB6 and Hypercard. We mostly gave up on 2D grids as device resolutions evolved. We made HTML, then made HTML5 as if everything was a blog or newspaper with a navigation bar, semantically (and you still have to learn that the nav contains a bulleted list?) Unfortunately, it became a 3-hour or 3-year or 30-year process for someone to learn “how do I…

Windows Forms with C# still works excellently. Sure, Microsoft has deprecated it a bunch of times trying to push a new UI paradigm every year, but good old WinForms will never die. The language is much better and the editor has more modern controls. Win32 calls are available relatively easily and the whole program runs quite a bit faster than VB6. It's a shame that this is so often overlooked. At some point everyone…

Yep. I cut my teeth making custom .ocx components. That teenager was part of your dll hell!

VB.net is pretty good, but at that point I just used C#. I go back and make C# guis every now and then with winforms. It always makes me think “how is everything else including QT and WPF and CSS worse decades later?” ;)

And how about that experiment with Electron? That ultimately ended up with me typing `atom foo.py` a few times a month and then being sad (50% of the time because it takes forever to load, the other 50% because it died like 3 years ago and isn’t installed).

Re: A TLS 1.3 stack written in Visual Basic 6

#45

VB6 was my first programming language. I started using it in 2001. I loved it, and it is the reason I am a programmer today. Seeing stuff like this is really cool.

My first paid programming job (summer 2001 after first year at uni) was a VB6 project for a friend's family member's company, to update their website easily. I think they might still be using it!

Re: A TLS 1.3 stack written in Visual Basic 6

#46
post #14

Earlier quoted context omitted.

Don’t tell anyone, but I still think we’ve been terrible at UIs since VB6 and Hypercard. We mostly gave up on 2D grids as device resolutions evolved. We made HTML, then made HTML5 as if everything was a blog or newspaper with a navigation bar, semantically (and you still have to learn that the nav contains a bulleted list?) Unfortunately, it became a 3-hour or 3-year or 30-year process for someone to learn “how do I…

Windows Forms with C# still works excellently. Sure, Microsoft has deprecated it a bunch of times trying to push a new UI paradigm every year, but good old WinForms will never die. The language is much better and the editor has more modern controls. Win32 calls are available relatively easily and the whole program runs quite a bit faster than VB6. It's a shame that this is so often overlooked. At some point everyone…

>Windows Forms with C# still works excellently.

I'm still using it although I'm not sure it's a great idea anchoring yourself in the past like that. Also the high dpi stuff has been improving but isn't really very good.

For all the criticism Apple gets on backwards compatibility I think they have a much better story than Microsoft when it comes to UI frameworks.

Re: A TLS 1.3 stack written in Visual Basic 6

#48

Earlier quoted context omitted.

Windows and Apple does. Linux is typically exposed through OpenSSL or an OpenSSL equivalent library. The downside to the OS provided libraries is that you are at the mercy of what the OS provides. You need Server 2022 or a relatively new Windows 10 build to have TLS 1.3 available.

The Linux kernel exposes TLS but very few people actually use it. On some hardware it can make TLS significantly faster, but on beefier hardware I doubt you'll notice the improvement much. At the cost of rewriting your entire network stack, I don't think it makes sense for many tools to switch to it. I'd argue that the Windows crypto system and openssl really aren't all that different, concept wise. In theory you can…

The Linux kernel only handles the TLS record layer. It's enough to use sendfile(2) on a TLS socket and that's all -- that's why it was added. Userland is still responsible for the TLS session negotiation and handing off the cryptographic keying material and parameters to the kernel; you still need a userland TLS library like OpenSSL.

Re: A TLS 1.3 stack written in Visual Basic 6

#49
post #10

Earlier quoted context omitted.

The big lines of code in TLS is x.509 certificate parsing, and supporting multiple protocols. If you just want 1.3 and you've got existing cipher and certificate validation libraries to call, it's not too bad. There's some published test vectors to help you get the cipher setup right as well; it gets fiddly, but it's not going to be a lot of code unless you have an Object Extravaganza, and even then, still not too ba…

I implemented TLS without any external deps by supporting only mandatory stuff from the RFC specifications. DER parsing here: https://github.com/mateuszb/tls1.3/blob/master/der.lisp Elliptic curves here: https://github.com/mateuszb/tls1.3/blob/master/elliptic-curv... Protocol records: https://github.com/mateuszb/tls1.3/blob/master/record.lisp At the time I implemented TLS1.3 there was very little support for it and i…

der.lisp is only loading a PKCS1/DER-encoded private RSA key, which is a far cry from certificate parsing. (And certificate.lisp just loads a blob.) Granted, for a server which doesn't support mTLS you don't need to parse certificates, or any other complex DER-encoded structures.

Re: A TLS 1.3 stack written in Visual Basic 6

#50
Ah,VB6 - that's how I started programming. There was a book literally called "Visual Basic for Kids" and I got it when I was....12? I think? Anyway it got me into making all kinds of basic games, then I started reading books about C and C++, started programming for the Playstation Portable, went to university to study CS and got a job in the games industry after that. I 100% credit Visual Basic 6 for me being a programmer today.
Post reply on HN