5

IMPORTANT: i dont reccommend you read through my code here. feel free to reach out for clarity on the details.

id like to investigate about rewriting my "decentralized p2p encrypted messaging app" in Rust. if you are familiar with any of the details, id like to hear your opnions on the approach.

my project is complex and would carry a significant overhead to redo in Rust. the core reason behind investigating rust is that it has better tooling for things like formal-verification. in general it seems like a better language for a project like mine. as a webdev, it was easy enough for me to put together and while i can use things like tauri to build for native, i think dioxus's approach for a native build is good.

im aiming to create something fairly unique for "secure messaging". i created a prototype (without AI) for my project to share and discuss. it demonstrates the core-concept around client-side managed secure cryptography in javascript.

https://github.com/positive-intentions/chat

javascript doesnt have a great reputation in the cryptography communities and its always a struggle to promote, so it was important for it to be open source. im proud of the work there, but i see details i overlooked. this led me to creating a new version to fix the outstanding issues. (it was things like handling key-rotation, group-messaging, etc).

https://positive-intentions.com/blog/introducing-enkrypted-chat

the MVP version lacked things like unit-tests, while the second-iteration not only had unit-test, but armed with AI, i was able to do things like create audits and formal-verification. the whole project is absurdly complicated and not worth your time to review. things like audits and formal-proofs/verification are fundamentally invalid because i used AI to create it. the attempt is genuine and i found the process educational, but cybersecurity and cryptography is specialized and has countless nuances to consider. it isnt worth your time to debug my code.

i now i think the project could benefit from being rewritten in Rust. its a much more suitable and respected language for what im trying to do, but i have never used rust to do something of this scale. i expect it will carry a huge learning curve given my background as a webdev.

https://github.com/positive-intentions/whatsup

creating a webapp for me is easy enough, but my project relies on some core technologies which i want supported on all platforms consistently. some core things i need to consider:

  • webrtc - its the core data-channel for my project. im sure that as a webapp it can be done... it might be a stretch to build a wasm to bridge to JS if nessesary, but im sure it can work. i would also like rust to build for other architectures. i think the support is also reasonable for the native build, but i wonder it there could be issues for a CLI version.
  • Module federation - in the browser-based version im using module-federation and its working as exected. it particularly helps to separate functionality, which is generally a good approach for a complex project. in Rust's cargo file, it seems i could add something like `foo_crate = { git = "https://github.com/MyOrg/foo/_crate"}`. that seems like it would also limit how i handle close-source details of the project
  • local-only storage - a core detail to my app is that it works p2p without registration. there are no databases of registered users. in a pwa i can use various forms of storage provided by the browser. i would like to use an approach that is consistent in rust to avoid bespoke code for different platforms (easier maintainance).\
  • ui framework - im using dioxus for far, but its largely AI slop... its could just as easily be leptos (im still investigating comparing the two)... but if i really think outside the box... i wonder how difficult it would be to use webcomponents from rust. i was working on a webcomponent framework and it would be interesting to seem if there would be a performance advantage to using something closer to vanillajs. webcomponents probably are not a good idea if i want better support between platforms.

maybe there are other details i should keep in mind? i think i will have to create multiple creates for things like UI components library and p2p-framework (similar to how i did it for the javascript version)

thanks for reading this far. have a nice day.

8
submitted 1 week ago by xoron@programming.dev to c/rust@lemmy.ml

Hey, I'm a webdev. I previously approached my project with JavaScript. I'm familiar with the js ecosystem.

I put a fair bit of consideration and in contrast to my JavaScript-approach, I'd like to investigate Dioxus.

I'm not completely new. I've dabbled in Rust before. I have read a lot of the docs and I'm sure there is much more to learn and practice.

What advice would you give to getting started with the Rust ecosystem approach?

Similar to a lot of languages there are considerations for things like tests. So it would be useful to see the options there. As well as any other best-practices and nuances.

In relation to my project, I'm particularly interested in the tooling available in rust for formal verification.


Just to be clear, im not here to waste your time on my slop, but if you want to see what I've got so far (practically nothing):

11

Hey, I'm a webdev. I previously approached the project with JavaScript. I'm familiar with the js ecosystem.

I put a fair bit of consideration and in contrast to my JavaScript-approach, I'd like to investigate Dioxus.

I'm not completely new. I've dabbled in rust before. I have read a lot of the docs and I'm sure there is much more to learn amd practice. I also don't want to downplay that I'm ai-slop-maxxing at scale.

What advice would you give to getting started with the rust ecosystem approach?

Similar to a lot of languages there are considerations for things like tests. So it would be useful to see the options there. As well as any other best-practices and nuances.

In relation to my project, I'm particularly interested in the tooling available in rust for formal verification.


Just to be clear, im not here to waste your time on my slop, but if you want to see what I've got so far (practically nothing):

-26
Signal Messenger Clone (thelemmy.club)
submitted 1 week ago* (last edited 1 week ago) by xoron@programming.dev to c/privacy@programming.dev

Lemmy isnt ready for this project and so deleting the post


I hope this project has reached a level i can share the following details. I've made a genuine effort towards documentation and transparancy. I dont think it'll ever be enough and so im still concerned it isnt ready to share. While im using AI throughout. This is not a vibecoded project. There is attention throughout for unit tests and formal-verification. With your feedback, id like to make improvements for clarity throughout.

This version of the app demonstrates a fairly unique approach using a browser-based, local-only and webrtc approach. I know it's impossible for any system to be the "world's most secure", but that isnt a reason to not try. By rigorously implementing an exhaustive list of security features and practices, the aim is to get as close as possible.

This is intended to demonstrate client-side managed secure cryptography.

I know the project above is going to be tricky to understand. It might help to understand with an open-source version of the concept for educational purposes. Its's important to note, i have since deprecated it in favour of the version linked above.

Open source demo (deprecated)

PS. Im calling it a "Signal Messenger Clone"... that's just a matter of how to frame it for users getting started. It doesnt work in a way thats comparable to the signal architecture. This project is fairly complicated and the links above are likely not going to be enough, so feel free to reach out for clarity on the details.

PPS. I made a similar post on Reddit and it seems to be reasonably well recieved and so branching out to Lemmy here. It might help to take a look there if questions are asked/answered already.

-5
Signal Messenger Clone (thelemmy.club)
submitted 1 week ago* (last edited 1 week ago) by xoron@programming.dev to c/javascript@programming.dev

Lemmy isnt ready for this project and so deleting the post


I hope this project has reached a level i can share the following details. I've made a genuine effort towards documentation and transparancy. I dont think it'll ever be enough and so im still concerned it isnt ready to share. While im using AI throughout. This is not a vibecoded project. There is attention throughout for unit tests and formal-verification. With your feedback, id like to make improvements for clarity throughout.

This version of the app demonstrates a fairly unique approach using a browser-based, local-only and webrtc approach. I know it's impossible for any system to be the "world's most secure", but that isnt a reason to not try. By rigorously implementing an exhaustive list of security features and practices, the aim is to get as close as possible.

This is intended to demonstrate client-side managed secure cryptography.

I know the project above is going to be tricky to understand. It might help to understand with an open-source version of the concept for educational purposes. Its's important to note, i have since deprecated it in favour of the version linked above.

Open source demo (deprecated)

PS. Im calling it a "Signal Messenger Clone"... that's just a matter of how to frame it for users getting started. It doesnt work in a way thats comparable to the signal architecture. This project is fairly complicated and the links above are likely not going to be enough, so feel free to reach out for clarity on the details.

PPS. I made a similar post on Reddit and it seems to be reasonably well recieved and so branching out to Lemmy here. It might help to take a look there if questions are asked/answered already. https://www.reddit.com/r/BuyFromEU/comments/1v8cx0s/europeanbased_signal_messenger_alternative/

14

i am working on a messaging app and created some details in rust. rust is useful because it has tooling for formal verification. my rust code compiles to WASM to be used in a browser.

my project itself is using cryptography beyond the WASM because browsers provide a crypto api for basic functionality out-of-the-box.

to work with what i have now (javascript/typescript) i came across this page, but the links lead to 404 pages on github. not sure about the status of the project. i dont know if there are other similar projects.

https://formal.land/docs/verification/typescript

i would like to improve the "formal-verification coverage" in my project and wanted to investigate if it could be worth considering rewriting the frontend with dioxus. im happy with an ugly UI (initially) in favour of having formal-verification on a broader scope of my project.

(context: the project where i have formal verification is found here: https://github.com/positive-intentions/signal-protocol (this isnt the gold-standard implementation and its far from finished)

-2
submitted 1 month ago* (last edited 1 month ago) by xoron@programming.dev to c/cybersecurity@sh.itjust.works

This is a technical demo of a fairly unique approach using a browser-based, local-first and webrtc approach.

This is intended to demonstrate client-side managed secure cryptography.

Features:

  • Core
    • PWA
    • P2P
    • Local-first / Local-only
    • No installation
    • TURN server
    • Encrypted-at-rest
  • WhatsApp clone
    • End to end encryption
    • Signal protocol
    • Post-Quantum cryptography
    • Multimedia
    • File transfer
    • Video calls
  • Nextcloud clone
    • Word
    • Spreadsheet
    • PDF
    • file-transfer
    • Encrypted vault

Some open source versions of the core concepts.

Feel free to reach out for clarity instead of diving into the docs.

IMPORTANT: While this is aiming to provide a secure experience, it isnt audited or reviewed. Shared for testing, feedback and demo purposes only. Please use responsibly.

3
submitted 1 month ago* (last edited 1 month ago) by xoron@programming.dev to c/react@programming.dev

A fairly unique approach to state management using encrypted asynchronous state updates.

It is not production-ready. I'm working on it to use in my own projects. It isn't reviewed or audited by a third-party, so I can't recommend you use it in your own code. Sharing for testing and demo purposes only.

TLDR; The title of this post.

Feel free to reach out for clarity instead of reading the code/docs.

I was working on “react-like syntax for webcomponents”. I started off with an approach for asynchronous state management so that components outside the shadow-root could receive updates. (The events are also encrypted to secure against things like browser extensions.)

https://positive-intentions.com/docs/projects/dim/async-state-management

It then made sense to be able to persist that data so it can work between page releoads.

https://positive-intentions.com/docs/projects/dim/bottom-up-storage

The result looks and works like the following when used in a project.

https://positive-intentions.com/docs/projects/dim/encrypted-store

The Dim framework seems like a dead-end. I wanted to try the hook out on my existing React projects. So I created the equivalent React hook.

https://positive-intentions.com/docs/projects/dim/use-dim-store-react

I find it to be performant and I want to push the scale of the approach, so I am in the process of testing it out on my projects. A notable use-case there is storing encrypted files at rest.

Feel free to reach out for clarity.

1

This is a technical demo of a fairly unique approach using a browser-based, local-first and webrtc approach. it allows to avoid centralized registration.

Enkrypted.Chat

This is intended to introduce a new paradigm in client-side managed secure cryptography. We can avoid registration of any sort.

Features:

  • PWA
  • P2P
  • End to end encryption
  • Signal protocol
  • Post-Quantum cryptography
  • Multimedia
  • File transfer
  • Video calls
  • Local-first
  • No installation

Some open source versions of the core concepts.

Feel free to reach out for clarity instead of diving into the docs. Please use responsibly.

IMPORTANT: Caution should always be used for projects like this. While this is aiming to provide a secure experience, it isnt audited or reviewed. Shared for testing, feedback and demo purposes only. If youre unsure, this isnt for you.

7

TLDR; The title of this post.

Feel free to reach out for clarity instead of reading the code/docs.

I was working on a “react-like syntax for webcomponents”, I wanted to create something robust and flexible for secure data storage and management.

I started off with an approach for asynchronous state management so that components outside the shadow-root could receive updates. (The events are also encrypted to secure against things like browser extensions.)

https://positive-intentions.com/docs/projects/dim/async-state-management

It then made sense to be able to persist that data so it can work between page releoads.

https://positive-intentions.com/docs/projects/dim/bottom-up-storage

The result looks and works like the following when used in a project.

https://positive-intentions.com/docs/projects/dim/encrypted-store

The Dim framework seems like a dead-end. I wanted to try it out on my existing React projects. So I created the equivalent React hooks.

https://positive-intentions.com/docs/projects/dim/use-dim-store-react

I find it to be performant and I want to push the scale of the approach, so I am in the process of testing it out on my projects. A notable use-case there is storing encrypted files at rest.

IMPORTANT: Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. You should not use this in your own code. It is not reviewed, audited or production-ready. It is not on npm. Shared for testing, feedback and demo purposes only.

2

TLDR; The title of this post.

Feel free to reach out for clarity instead of reading the code/docs.

I was working on a “react-like syntax for webcomponents”, I wanted to create something robust and flexible for secure data storage and management.

I started off with an approach for asynchronous state management so that components outside the shadow-root could receive updates. (The events are also encrypted to secure against things like browser extensions.)

https://positive-intentions.com/docs/projects/dim/async-state-management

It then made sense to be able to persist that data so it can work between page releoads.

https://positive-intentions.com/docs/projects/dim/bottom-up-storage

The result looks and works like the following when used in a project.

https://positive-intentions.com/docs/projects/dim/encrypted-store

The Dim framework seems like a dead-end. I wanted to try it out on my existing React projects. So I created the equivalent React hooks.

https://positive-intentions.com/docs/projects/dim/use-dim-store-react

I find it to be performant and I want to push the scale of the approach, so I am in the process of testing it out on my projects. A notable use-case there is storing encrypted files at rest.

IMPORTANT: Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. You should not use this in your own code. It is not reviewed, audited or production-ready. It is not on npm. Shared for testing, feedback and demo purposes only.

7
submitted 1 month ago* (last edited 1 month ago) by xoron@programming.dev to c/webdev@programming.dev

TLDR; The title of this post.

Feel free to reach out for clarity instead of reading the code/docs.

I was working on a “react-like syntax for webcomponents”, I wanted to create something robust and flexible for secure data storage and management.

I started off with an approach for asynchronous state management so that components outside the shadow-root could receive updates. (The events are also encrypted to secure against things like browser extensions.)

https://positive-intentions.com/docs/projects/dim/async-state-management

It then made sense to be able to persist that data so it can work between page releoads.

https://positive-intentions.com/docs/projects/dim/bottom-up-storage

The result looks and works like the following when used in a project.

https://positive-intentions.com/docs/projects/dim/encrypted-store

The Dim framework seems like a dead-end. I wanted to try it out on my existing React projects. So I created the equivalent React hooks.

https://positive-intentions.com/docs/projects/dim/use-dim-store-react

I find it to be performant and I want to push the scale of the approach, so I am in the process of testing it out on my projects. A notable use-case there is storing encrypted files at rest.

IMPORTANT: Im not trying to promote “yet another ui framework”, this is an investigation to see what is possible. You should not use this in your own code. It is not reviewed, audited or production-ready. It is not on npm. Shared for testing, feedback and demo purposes only.

[-] xoron@programming.dev 4 points 4 months ago

thanks for the tip. it seems nlnet seem to use radically open security. so i pinged them an email.

[-] xoron@programming.dev 4 points 8 months ago* (last edited 8 months ago)

the org can be found here: https://github.com/positive-intentions

the prerelease demo linked in the post is not open source.

[-] xoron@programming.dev 5 points 9 months ago

Hi. Yeah I'm the creator.

I think I need to do a bit a of rebranding so that it's easier to find. "positive-intentions" isn't the easiest to type/remember.

[-] xoron@programming.dev 4 points 10 months ago

There are ways around using a central server to establish a p2p connection. It isn't well explained or demonstrated, but the concept seems to work here: https://github.com/positive-intentions/chat/issues/6 .... I'd like to explore this more with exchanging the required data over QR codes or NFC.

Simplex is a great approach for p2p communication. I can easily recommend it over what I have done so far. At the very least, it's gone through things like a professional security audits and seem to keep a high standard in their practices.

[-] xoron@programming.dev 4 points 1 year ago

the difference with my approach is that there is no registration or installation. as a webapp its easier for users to get started.

localsend is a good approach and my project isnt anywhere near the quality seen there (or several other examples). i hope to be able to create something competative in the space.

(i am investigating providing the app natively for various platforms for better reach, but the core requirement for my app is to have a modern browser)

[-] xoron@programming.dev 6 points 1 year ago

Just to be clear, my own open source code. Yes.

[-] xoron@programming.dev 11 points 1 year ago

Thanks!

Perhaps you'd like to give feedback on a separate but similar foss project: https://github.com/positive-intentions/chat

[-] xoron@programming.dev 6 points 2 years ago

thanks! i'll make time to create those.

[-] xoron@programming.dev 5 points 2 years ago* (last edited 2 years ago)

ive tried several variations in how to communicate about it.

with blog link/with repo link/with a mix

https://programming.dev/post/21417457

it seems my projects are well recieved, but i guess it just isnt interesting for the minority of developers that would consider contributing. i also dont explicitly ask for contribution. this post this the first time im doing that to see what it could yield.

[-] xoron@programming.dev 4 points 2 years ago

thanks. maybe i havent reached the point at which people are using my projects enough for them to to improve a part of it.

[-] xoron@programming.dev 5 points 2 years ago

thanks for the tips.

i typically mention the git repo's involved.

i'll give it a go with something like contribution welcome. my projects are on github and i think i have something setup for issues tracking.

i suspect my projects might be a bit complicated and so unappealing to a random contributor.

[-] xoron@programming.dev 7 points 2 years ago

no. it isnt better or more stable than React. its all an experimental proof-of-concept.

its an idea im trying out. i thought maybe others might find it interesting.

im aiming to see if i can get something that looks and behaves like React, but works natively in a browser without the need to build or transpile. i think in theory it could work.

view more: next ›

xoron

0 post score
0 comment score
joined 2 years ago