Skip to content

attester.flowcrypt.com

Tom J edited this page Jan 7, 2018 · 2 revisions

Attester is a server that keeps track of public keys, verifies them and allows people to look up public keys of other people.

I will explain more details later, for now, below is raw API spec:

API documentation

API status (attester.flowcrypt.com)
 * GET /, response 200: {"alive": True}

API calls:
 * POST /test/welcome 			# Send a welcome test email
 * POST /initial/request 			# Request initial pubkey attest
 * POST /initial/legacy_submit 			# Submit a pubkey
 * POST /initial/confirm 			# Confirm initial pubkey validation
 * POST /lookup/email 			# Find a pubkey for email address
 * POST /replace/request 			# Request a pubkey replacement
 * POST /replace/confirm 			# Confirm a pubkey replacement


###############   TEST function calls   ##################


POST /test/welcome  {
	"email" (<type 'str'>)  # email to send a welcome to
	"pubkey" (<type 'str'>)  # ascii armored pubkey to encrypt welcome message for
}, response(200): {
	"sent" (True, False)  # successfuly sent email
	[voluntary] "error" (<type 'str'>)  # error detail, if not saved
}



###############   INITIAL function calls   ##################


POST /initial/request  {
	"email" (<type 'str'>)  # email to use pubkey for
	"pubkey" (<type 'str'>)  # ascii armored pubkey
	[voluntary] "attest" (True, False)  # send attestation email (for backward compatibility, ignored, treated as always True)
}, response(200): {
	"saved" (True, False)  # successfully saved pubkey
	"attested" (True, False)  # previously went through full attestation using keys/attest
	[voluntary] "error" (<type 'str'>)  # error detail, if not saved
}


POST /initial/legacy_submit  {
	"email" (<type 'str'>)  # email to use pubkey for
	"pubkey" (<type 'str'>)  # ascii armored pubkey
	[voluntary] "attest" (True, False)  # send attestation email
}, response(200): {
	"saved" (True, False)  # successfuly saved pubkey
	"attested" (True, False)  # previously went through full attestation using keys/attest
	[voluntary] "error" (<type 'str'>)  # error detail, if not saved
}


POST /initial/confirm  {
	[voluntary] "signed_message" (<type 'str'>)  # Signed attest packet if attesting first time
}, response(200): {
	"attested" (True, False)  # successfuly attested initial entry
	[voluntary] "error" (<type 'str'>)  # error detail, if not saved
}



###############   LOOKUP function calls   ##################


POST /lookup/email  {
	"email" (<type 'str'>, <type 'list'>)  # email or list of emails to find pgp pubkey(s) for
}, response(200): {
	[voluntary] "pubkey" (<type 'str'>, None)  # ASCII armored pubkey or null (if single email supplied)
	[voluntary] "email" (<type 'str'>)  # Requested email (if single email supplied)
	[voluntary] "attested" (True, False)  # was this email/pubkey attested
	[voluntary] "has_cryptup" (<type 'bool'>)  # True for flowcrypt users
	[voluntary] "results" (<type 'list'>)  # List of {pubkey, email, has_cryptup} if list of emails supplied
	[voluntary] "error" (<type 'str'>)  # Error if cannot get pubkey
}



###############   REPLACE function calls   ##################


POST /replace/request  {
	"signed_message" (<type 'str'>)  # signed request_replace packet (using old/original key)
	"new_pubkey" (<type 'str'>)  # new pubkey
	"email" (<type 'str'>)  # email this request_replace packet is associated with
}, response(200): {
	"saved" (True, False)  # successfuly saved request, sent email to confirm
	[voluntary] "error" (<type 'str'>)  # error detail if not saved
}


POST /replace/confirm  {
	"signed_message" (<type 'str'>)  # signed confirm_replace packet (using new/replacement key)
}, response(200): {
	"attested" (True, False)  # successfuly attested replacement
	[voluntary] "error" (<type 'str'>)  # error detail if not attested
}
Clone this wiki locally