Skip to content

Instantly share code, notes, and snippets.

View nurupo's full-sized avatar

nurupo

  • nurupo at irc://irc.libera.chat:6697
View GitHub Profile
// "License": Public Domain
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
#ifndef PORTABLE_ENDIAN_H__
#define PORTABLE_ENDIAN_H__
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)
# define __WINDOWS__
@nurupo
nurupo / bootstrap_node_info.py
Last active August 29, 2015 14:02
Gets version and MOTD info from a Tox DHT bootstrap node, if such are set.
#!/usr/bin/env python
"""
Copyright (c) 2014 by nurupo <nurupo.contributions@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
#-------------------------------------------------
#
# Project created by QtCreator 2014-04-01T02:11:23
#
#-------------------------------------------------
QT += widgets network
TARGET = ToxDNSRecordResolver
TEMPLATE = app
@nurupo
nurupo / groupchat-permissions.txt
Last active August 29, 2015 13:57
Permission idea for Tox groupchats
1. Founder has all permissions.
2. Everyone in the chatroom can verify that public key X is indeed founder's key, it's a property of the chatroom and no peer stores it i.e. the chatroom itself contains that information somewhere, presumably in its ID (we don't rely on chatroom peers storing that data because they can came up with whatever they want i.e. say that the key X is not founder's key; we want that verification to be 100% exact and to work with even 1 peer in the chatroom).
3. To give permissions to user A, founder gives user A data which tells what permission level does A have (if we are going to have permission levels in tox at all). The data is signed by founder's private key.
4. Now A can show anyone that signed by founder data from the step (3) as a proof of her having permissions (anyone can verify that it was indeed signed by founder by (2)), so A can exercise her rights over everyone in the chatroom.
5. If A gives permissions to B, 1) A sends her founder-signed data to B to show that she i
@nurupo
nurupo / list.md
Last active December 20, 2015 10:20
List of DHT bootstrap nodes for Toxhttps://github.com/irungentoo/ProjectTox-Core