Spyke

Posts

aicoding·AI Codingbyxoron

Signal Messager Clone in Rust

Important: The following is an example of AI-slop-maxxxing at scale. I chose to post this content on this sub specifically for that reason. (It would just be offensive to share on the Rust community)

The following project is based on a (non-vibecoded) browser based messaging app as further described here.

I'm proactively learning rust, but I don't consider myself a rust programmer. I started of creating a basic ui demo of the app. All the data there is hard coded with mock responses. There is no "actual" messaging functionality.

it soon gets bloated as i start adding more ui components, so i moved them to a separate repo to be imported. As a webdev im used to things like storybook to view and edit components. I asked about my options in a post and it doesnt seem like something is suitable for my needs.

https://www.reddit.com/r/rust/comments/1vg7hox/looking/_for/_storybookforrust

So one thing led to another... and i created my own version of storybook. Its ultimately only for my own benefit and i can easily address nuanced needs like being able to display a tui on a browser.

The storybook and ui components are basically for my own use. I already have an existing rust project i could use this on. So i made the storybook-like components exportable and reusable for my signal-protocol project.

I've previous put time and effort towards the signal protocol. It should be reasonably tested and documented. The signal protocol alone isn't going to fit the requirements of my messaging app. It needs to be post-quantum secure. I previous worked on a js implementation for ml-kem, so as part of this new approach, I would like to move towards a pure rust approach for ml-kem.

Unlike the signal-protocol which needed more involvement to create, the ml-kem is using dependencies to match the official implementation. I can benefit from audits and reviews from the official implementation. The signal-protocol and ml-kem were ultimately stepping-stones created to lead towards PQXDH.

I think there are countless details I could improve on the cryptography. There is clearly much more needed, but I'm going to "pause" progress on the cryptography in favour of progress on the project features. I was previously investigation options for decentralised storage here. I wanted to try implementing something that would be a suitable storage solution for my project.

(Note: I suspect providers like GitHub, Codeberg and Gitlab might see the way the app works as against their terms-of-service.)

There is much more to improve and consider there for things like encrypting the data at rest, so let's create a cryptography utility library. I already previously created a crypto utility for the js version of my project, so let's create the corresponding rust equivalent.

this project is far from finished. i would also need to work towards a solution for webrtc messaging, local storage and countless other details. To find out more, check out the following links:

IMPORTANT: AI doesnt replace due-diligence... especially notable on a project like this. None of my work has been audited or reviewed. I'm sharing for transparency on progress. Please use responsibly.

View original on programming.dev
-5
rust·Rustbyxoron

PWA in Rust - Seeking opinions on approach

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.

View original on programming.dev
11
rust·Rust Programmingbyxoron

New to Dioxus and Rust. Any tips about getting started?

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):

View original on programming.dev
7
rust·Rustbyxoron

New to Dioxus and Rust. Any tips about getting started?

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):

View original on programming.dev
11
privacy·Privacybyxoron

Signal Messenger Clone

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.

View original on programming.dev
-25
javascript·JavaScriptbyxoron

Signal Messenger Clone

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/

View original on programming.dev
-4
rust·Rustbyxoron

Anybody with experience / insights on Dioxus? I have an idea and want to see if its worth investigating further.

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)

View original on programming.dev
13
cybersecurity·Cybersecuritybyxoron

WhatsApp Clone... But Decentralised

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.

View original on programming.dev
-2
react·Reactbyxoron

A React Hook For Asynchronous State Management.

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.

https://positive-intentions.com/docs/projects/dim/encrypted-storeOpen linkView original on programming.dev
3
securecoms·Secure Comsbyxoron

Enkrypted Chat - Signal-Protocol-Based PWA

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.

View original on programming.dev
1
programming·Programmingbyxoron

I Created A Hook For "Encrypted Asynchronous State Persistence"

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.

View original on programming.dev
7
javascript·JavaScriptbyxoron

I Created A Hook For "Encrypted Asynchronous State Persistence"

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.

View original on programming.dev
2
webdev·Web Developmentbyxoron

I Created A Hook For "Encrypted Asynchronous State Persistence"

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.

View original on programming.dev
7

Browser-Based Office Suite

By leveraging FileSystem API for browser-based file-management, we can create a fairly unique approach for interacting with files on your device from your browser.

Features:

  • PWA
  • Local-first
  • Word
  • Spreadsheet
  • PDF

Coming soon:

  • Support for more filtypes
  • Storage sync
  • Collaborative editing
  • Encryption at rest
  • P2P file-transfer

*** The project is experimental and far from finished. It's presented for testing, feedback and demo purposes only (USE RESPONSIBLY!). ***

This project isnt finished enough to compare to Microsoft Office. This is intended to demonstrate client-side managed functionality. Allowing users to get started without setup.

I have a demo version for testing. It isnt ready to replace any existing app or service, but it would be great to get your feedback on it.

The implementation is based on the functionality described in a previous post.

View original on programming.dev
6
javascript·JavaScriptbyxoron

Browser-Based VeraCrypt Clone

By leveraging WebCrypto API and FileSystem API for browser-based encryption, we can create a fairly unique approach for encrypting and storing files directly on your device from your browser.

*** The project is experimental and far from finished. It's presented for testing, feedback and demo purposes only (USE RESPONSIBLY!). ***

This project isnt finished enough to compare to veracrypt. This is intended to demonstrate client-side managed secure cryptography. Allowing users to get started without setup.

i have a demo version for testing. it isnt ready to replace any existing app or service, but its a work-in-progress and it would be great to get your feedback on it.

the implementation is based on the functionality described in a previous post.

View original on programming.dev
3
opensource·Opensourcebyxoron

Signal Protocol in Rust for Frontend Javascript

Id like to share my implementation of the signal protocol that i use in my messaging app. The implementation is in rust and compiles to WASM for browser-based usage.

The aim is for it to align with the official implementation (https://github.com/signalapp/libsignal). That version was not used because my use case required client side browser-based functionality and i struggled to achieve that in the official one where javascript is used but is targeting nodejs.

There are other nuances to my approach like using module federation, which led to me moving away from the official version.


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

Its worth mentioning that its far from finished and i hope with feedback i can make it better. I have put efforts towards directing it towards unit-tests, an audit and formal-proofs. None of that is good-enough, but i hope it can act as a starting point for verifying the implementation is correct.

Im sure people have better things to do with their time than review unstable and unfinished code. The transparency is intended for professionals that may be curious... Feel free to reach out for clarity instead of reading the code/docs.

View original on programming.dev
12
opensource·Opensourcebyxoron

ReactJS Syntax For Web Components

Im investigating an idea i had about React-like syntax for webcomponents after some experience with Lit.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

(My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects.)

IMPORTANT: Dont be misled by it being open-source. Im not trying to push "yet another ui framework", this is an investigation to see what is possible. You should not use this framework in your own code. It is not production-ready. It is not on NPM. It is intended for myself on my own projects. This project is far from finished. I am sharing because it might be interesting/educational for someone. Feel free to reach out for clarity if you have any questions.

https://positive-intentions.com/docs/projects/dim/dim-todo-listOpen linkView original on programming.dev
4
opensource·Opensourcebyxoron

Chat - Decentralized P2P Messenging

"Secure and private" is the general aim.

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

This is intended to demonstrate client-side managed cryptography. We can avoid registration of any sort.

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

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

Features:

  • P2P
  • End to end encryption
  • File transfer
  • Local-first
  • No registration
  • No installation
  • No database

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

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.

View original on programming.dev
1
javascript·JavaScript communitybyxoron

ReactJS Syntax For Web Components

Im investigating an idea i had about React-like syntax for webcomponents after some experience with Lit.

Lit is a nice lightweight UI framework, but i didnt like that it was using class-based components. It's an acquired taste I haven't acquired.

Vue has a nice approach but i prefer working with the syntax that React uses. I find it more intuitive for debugging and deterministic rendering. I wondered if with webcomponents, i could create a UI framework that didnt need to be transpiled.

(My intentions with this framework is to get to a reasonable level of stability, to then replace React on some of my existing projects.)

IMPORTANT: Dont be misled by it being open-source. Im not trying to promote "yet another ui framework", this is my own investigation to see what is possible. You should not use this framework in your own code. It is not production-ready. It is not on NPM. It is intended for myself on my own projects. This project is far from finished. I am sharing because it might be interesting/educational for someone. Feel free to reach out for clarity if you have any questions.

View original on programming.dev
0
git·Gitbyxoron

Can we use Github as free cloud storage?

im working on a decentralized messaging app and generally up until recently i thought in such a system, if a peer is offline, you cant send a message... it wouldnt be "decentralized" if there was some central queue of messages.

it took embarassingly long, but then it hit me... git... just regular git is a decentralized database.

in my setup i need the ability for others to be abe to read and only i should be able to write to it. that functionality is out-the-box in git.

git is also pretty standardized so there are many providers if users want to move away from Github.

the storage requirements for my project are fairly small. typically small text messages. the data itself thats publicly readable would be encrypted.

View original on programming.dev