29 Sep 2024 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Oh, forgot to mention, python^ | 12:08:00 |
xiretza | what do you have so far? | 12:09:29 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Not much, honestly | 12:10:43 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | I'm going down the list on spec.matrix.org for server to server api | 12:11:06 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | And this is the second one | 12:11:22 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | As well as, federationtester checks for it | 12:11:34 |
xiretza | what I meant was "please share the code you have right now, because it's easier to correct existing code than spoon-feed it all from scratch" | 12:12:45 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | I'm not experienced with handling cryptography stuffs so i have no idea where to begin | 12:12:51 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Oh holdon | 12:12:53 |
xiretza | In reply to @admin:basket-weaving.kyrgyzstan.kg I'm going down the list on spec.matrix.org for server to server api that is... an interesting way of implementing a matrix server | 12:13:30 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | This is just testing code
```
def generate_keys():
private_key = ed25519.Ed25519PrivateKey.generate()
private_key_bytes = private_key.private_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PrivateFormat.Raw,
encryption_algorithm=serialization.NoEncryption()
)
public_key = private_key.public_key()
public_key_bytes = public_key.public_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PublicFormat.Raw
)
def to_unpadded_base64(data):
return base64.b64encode(data).rstrip(b'=').decode('utf-8')
global privkey, pubkey
privkey = to_unpadded_base64(private_key_bytes)
pubkey = to_unpadded_base64(public_key_bytes)
print(f"Private Key (Base64, no padding): {privkey}")
print(f"Public Key (Base64, no padding): {pubkey}")
``` | 12:14:00 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | * This is just testing code
```
def generate_keys():
private_key = ed25519.Ed25519PrivateKey.generate()
private_key_bytes = private_key.private_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PrivateFormat.Raw,
encryption_algorithm=serialization.NoEncryption()
)
public_key = private_key.public_key()
public_key_bytes = public_key.public_bytes(
encoding=serialization.Encoding.Raw,
format=serialization.PublicFormat.Raw
)
def to_unpadded_base64(data):
return base64.b64encode(data).rstrip(b'=').decode('utf-8')
global privkey, pubkey
privkey = to_unpadded_base64(private_key_bytes)
pubkey = to_unpadded_base64(public_key_bytes)
print(f"Private Key (Base64, no padding): {privkey}")
print(f"Public Key (Base64, no padding): {pubkey}")
``` | 12:15:27 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Any ideas? | 14:20:04 |
xiretza | can't find anything obviously wrong, what exactly is the issue you're seeing? | 14:20:56 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Federation tester fails | 14:32:30 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | With ed25519 | 14:32:35 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Im not sure if the key is supposed to correspond to something? | 14:32:45 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | Rn its random^ | 14:32:52 |
xiretza | In reply to @admin:basket-weaving.kyrgyzstan.kg Federation tester fails what's the homeserver? | 14:33:20 |
xiretza | In reply to @admin:basket-weaving.kyrgyzstan.kg Federation tester fails * what's the homeserver domain? | 14:33:22 |
xiretza | In reply to @admin:basket-weaving.kyrgyzstan.kg Im not sure if the key is supposed to correspond to something? well obviously you're not supposed to just return some randomly generated key that you immediately throw away; it's your server's signing key | 14:34:07 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | In reply to @xiretza:xiretza.xyz what's the homeserver domain? Holdon, let me dtart it up | 14:40:12 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | In reply to @xiretza:xiretza.xyz well obviously you're not supposed to just return some randomly generated key that you immediately throw away; it's your server's signing key Oh yeah ik that lol | 14:40:17 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | This is just for testing | 14:40:21 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | https://test.basket-weaving.kyrgyzstan.kg | 14:41:21 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | "Checks": {
"AllChecksOK": false,
"MatchingServerName": true,
"FutureValidUntilTS": false,
"HasEd25519Key": true,
"AllEd25519ChecksOK": false,
"Ed25519Checks": {
"ed25519:1": {
"ValidEd25519": true,
"MatchingSignature": false
}
},
"ValidCertificates": true
},
| 14:45:28 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | so it is valid ed25519 | 14:45:46 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | but signature is not matching, whatever that means? | 14:45:54 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | i have noticed that synapse homeserver.signing.key has /Di/ mid way through ity | 14:46:38 |
The Basket Weaving Admin [basket-weaving.kyrgyzstan.kg] | * i have noticed that synapse homeserver.signing.key has /Di/ mid way through it | 14:46:39 |