@worldpeaceenginelabs
@draeder is the code execution a gun feature or a gunsafe feature? is it possible to use the execution function from gunsafe solo?
It's a gunsafe feature, but really should be used with caution because both methods have access to the global scope.
nodejs, relay.js
const server = http.createServer();
server.listen(9000);
const gun = new Gun({
web: server,
verify: {
check: function(){
console.log("peer connected");
return true;
}
}
})
nodejs, peer.js
const gun = new Gun({
peers: ['localhost:9000']
})
function setData() {}
function getData() {}
Hey. I am trying out GUN and so far it looks nice. And what I am trying to understand right now is how visibility of graph database works in GUN.
For instance, docs mention that there are different spaces with different "permissions" as shown in the image.
I wonder if it is possible to have a different type of space (like session space) or build such space using the user space, where the presence of data is visible only to he participants of such space who know some common secret (any random string for instance) and for other users who don't know this secred the data is not visible, but those other users still can be connected to same relay servers.
Is it something that GUN can do? afaiu SEA grants capability to sign and verify messages, but I am not sure if it is possible to make relays and peers ignore invalid messages. How can I protect the data in a "session" from a bad actor who might start traversing the graph and writing random data there?
I might be misunderstanding GUNs purpose here and I wonder if those things in the scope of GUN, or am I asking for too much
I maybe can have a way of deterministicaly generatin key pairs from some random string. That way peers would be able to encrypt/decrypt messages with such common key.
But how would I make the peers know what part of the graph they should use for exchange with those messages without exposing the initial string.
Maybe hash this string it and attach it to the root node with this hash as key, but again, how would I then protect such communication from misbehaving actor who will be finding all the nodes from root node and overwriting every node to erase information.
Can many root nodes be hosted on a same network of relays and peers, where there would be no paths between those root nodes and the only way to write/read data to some root node is to know it's soul?
:point_up: Edit: I maybe can have a way of deterministicaly generate key pairs from some random string. That way peers would be able to encrypt/decrypt messages with such common key.
But how would I make the peers know what part of the graph they should use for exchange with those messages without exposing the initial string.
Maybe hash this string it and attach it to the root node with this hash as key, but again, how would I then protect such communication from misbehaving actor who will be finding all the nodes from root node and overwriting every node to erase information.
Can many root nodes be hosted on a same network of relays and peers, where there would be no paths between those root nodes and the only way to write/read data to some root node is to know it's soul?
verschmelzen: hello, welcome to the community. What you are looking for may just be the user space of a "user" that your group users? So create an account and share the public and private key with all users you want to be able to edit the messages.
And if you don't want others to read the saved data use encryption
OK.
Who is the person running a pirating site ontop of GUN?
Fess up now, to me, in a twitter DM.
Cause I turn on my DHT tests and my computer literally starts streaming 5MB/s of data from random peers out there
and when I peek at the data, its a whole catalogue if movie titles, descriptions, etc.
TBH, I have no clue how this is happening or working.
The DHT test is already connecting to random machines that should be impossible (it's already found Iris' rust peer, even tho we never coded it to find it, and I haven't even published the code yet! I'm not sure how this is possible.)
Ugh...
I've already seen the test crash multiple random relays.
I apologize, please watch your relays as they might get DDoSed as I'm trying to stabilize network.
And then I'll need everyone to upgrade code, so we're running the same stabilizers.
I guess I'll catch up with chats now instead, seeing some bugs reported.
Give me a bit to read thru & reply.
at least this seems to be how it's going to work
await SEA.encrypt("hi group", commonSecret)
don't forget to study the https://gun.eco/docs/Cartoon-Cryptography .opt
since opt doesn't go to disk.I am getting deeper and deeper into cryptography, and all I want to do is get a key pair from a shared secret.
SubtleCrypto can only deriveKey
from already valid key. So I found this package. But they have keyFromSecret
only on EdDSA curve, and afaiu ECDSA does not support key generation from random data (which is weird because if I was able to replace internal random number generator with my own I would get what I want, no matter the curve).
So I have 2 options now:
The question with 2 right now is if GUN could use those keys or is it only can work with what is compatible with SubtleCrypto
?