/pea

Primary LanguageC

PEA

PEA is used to securely create and sign petitions

host

a host daemon (source file: host/pea.c) is spawned

usage:

./pea_h [socket file] [petition output file]

socket file and petition output file must both be complete filepaths

both files should be in directories accessible by any users who might want or need to sign a petition

client

pea is used to operate on petitions petitions can be signed, unsigned, created, removed (with the proper credentials), or written to the petition output file designated by pea_h

usage:

./pea socket_file print print_filepath    # print all petitions and signatures to print_filepath
./pea socket_file sign list_item           # sign petition
./pea socket_file create petition_name     # create new petition
./pea socket_file remove list_item         # remove petition
./pea socket_file unsign list_item         # remove petition
./pea socket_file import backup_file_path  # creates a petition to import petitions and signatures from backup file
                                           # petitions will be imported automatically once all petition creators from
                                           # backup file as well as the user who spawned the PEA host have signed

notes

  • PEA will only compile on linux machines. PEA is able to record signatures securely by avoiding relying on signers to report their own credentials. this is done by having the kernel report credentials through AF_UNIX sockets using SO_PEERCRED for linux and getpeereid() otherwise if it is available
  • when a petition is removed, petition indices are shifted
  • PEA sends petition indices using 16 bits of precision. for this reason, PEA only supports indices up to 2^16 or 65,535

TODO

  • add README
  • add unsign functionality
  • backup to file
  • rename list to printfile, add list command that prints petitions locally
  • return error numbers to client after command execution
  • use less precision for pet_option in packed integer to make more room for petition indices
  • fix undefined behavior in remove_p and remove_sig