1*0a6a1f1dSLionel Sambuc.\" $NetBSD: libpaa.3,v 1.4 2014/03/18 18:20:35 riastradh Exp $ 2ebfedea0SLionel Sambuc.\" 3ebfedea0SLionel Sambuc.\" Copyright (c) 2009,2010 The NetBSD Foundation, Inc. 4ebfedea0SLionel Sambuc.\" All rights reserved. 5ebfedea0SLionel Sambuc.\" 6ebfedea0SLionel Sambuc.\" This manual page is derived from software contributed to The 7ebfedea0SLionel Sambuc.\" NetBSD Foundation by Alistair Crooks (agc@NetBSD.org) 8ebfedea0SLionel Sambuc.\" 9ebfedea0SLionel Sambuc.\" Redistribution and use in source and binary forms, with or without 10ebfedea0SLionel Sambuc.\" modification, are permitted provided that the following conditions 11ebfedea0SLionel Sambuc.\" are met: 12ebfedea0SLionel Sambuc.\" 1. Redistributions of source code must retain the above copyright 13ebfedea0SLionel Sambuc.\" notice, this list of conditions and the following disclaimer. 14ebfedea0SLionel Sambuc.\" 2. Redistributions in binary form must reproduce the above copyright 15ebfedea0SLionel Sambuc.\" notice, this list of conditions and the following disclaimer in the 16ebfedea0SLionel Sambuc.\" documentation and/or other materials provided with the distribution. 17ebfedea0SLionel Sambuc.\" 18ebfedea0SLionel Sambuc.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19ebfedea0SLionel Sambuc.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20ebfedea0SLionel Sambuc.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21ebfedea0SLionel Sambuc.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22ebfedea0SLionel Sambuc.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23ebfedea0SLionel Sambuc.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24ebfedea0SLionel Sambuc.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25ebfedea0SLionel Sambuc.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26ebfedea0SLionel Sambuc.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27ebfedea0SLionel Sambuc.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28ebfedea0SLionel Sambuc.\" POSSIBILITY OF SUCH DAMAGE. 29ebfedea0SLionel Sambuc.\" 30ebfedea0SLionel Sambuc.Dd September 9, 2010 31ebfedea0SLionel Sambuc.Dt LIBPAA 3 32ebfedea0SLionel Sambuc.Os 33ebfedea0SLionel Sambuc.Sh NAME 34ebfedea0SLionel Sambuc.Nm libpaa 35ebfedea0SLionel Sambuc.Nd Public key Access Authentication Library 36ebfedea0SLionel Sambuc.Sh LIBRARY 37ebfedea0SLionel Sambuc.Lb libpaa 38ebfedea0SLionel Sambuc.Sh SYNOPSIS 39ebfedea0SLionel Sambuc.In libpaa.h 40ebfedea0SLionel Sambuc.Ft int 41ebfedea0SLionel Sambuc.Fo paa_server_init 42ebfedea0SLionel Sambuc.Fa "paa_server_info_t *server" "unsigned secretsize" 43ebfedea0SLionel Sambuc.Fc 44ebfedea0SLionel Sambuc.Ft int 45ebfedea0SLionel Sambuc.Fo paa_format_challenge 46ebfedea0SLionel Sambuc.Fa "paa_challenge_t *challenge" "paa_server_info_t *server" 47ebfedea0SLionel Sambuc.Fa "char *buf" "size_t size" 48ebfedea0SLionel Sambuc.Fc 49ebfedea0SLionel Sambuc.Ft int 50ebfedea0SLionel Sambuc.Fo paa_format_response 51ebfedea0SLionel Sambuc.Fa "paa_response_t *response" "netpgp_t *netpgp" "char *in" 52ebfedea0SLionel Sambuc.Fa "char *out" "size_t outsize" 53ebfedea0SLionel Sambuc.Fc 54ebfedea0SLionel Sambuc.Ft int 55ebfedea0SLionel Sambuc.Fo paa_check_response 56ebfedea0SLionel Sambuc.Fa "paa_challenge_t *challenge" "paa_identity_t *id" 57ebfedea0SLionel Sambuc.Fa "netpgp_t *netpgp" "char *response" 58ebfedea0SLionel Sambuc.Fc 59ebfedea0SLionel Sambuc.Ft int 60ebfedea0SLionel Sambuc.Fo paa_print_identity 61ebfedea0SLionel Sambuc.Fa "FILE *fp" "paa_identity_t *id" 62ebfedea0SLionel Sambuc.Fc 63ebfedea0SLionel Sambuc.Sh DESCRIPTION 64ebfedea0SLionel Sambuc.Nm 65ebfedea0SLionel Sambucis a library interface which provides an authentication mechanism 66ebfedea0SLionel Sambuclayered on top of 67ebfedea0SLionel Sambuc.Xr libnetpgp 3 . 68ebfedea0SLionel SambucThis is targeted at web services, and allows authentication by 69ebfedea0SLionel Sambucmeans of digitally signing a generated challenge. 70ebfedea0SLionel SambucBy verifying the signed response from the client, the server 71ebfedea0SLionel Sambuccan verify the identity of the user receiving the challenge, 72ebfedea0SLionel Sambucand producing the signed response. 73ebfedea0SLionel SambucRandom seeds and blinded secrets are used to protect against 74ebfedea0SLionel Sambucspoofed signatures. 75ebfedea0SLionel Sambuc.Pp 76ebfedea0SLionel SambucThe main reason for writing this authentication mechanism is 77ebfedea0SLionel Sambucso that identities can be verified across a network without 78ebfedea0SLionel Sambuctransferring any secret information across the wire. 79ebfedea0SLionel Sambuc.Pp 80ebfedea0SLionel SambucBinary information is transferred using internal base64 81ebfedea0SLionel Sambucfunctions. 82ebfedea0SLionel Sambuc.Pp 83ebfedea0SLionel SambucIn the server 84ebfedea0SLionel Sambucprocess, the server information is initialised using the 85ebfedea0SLionel Sambuc.Fn paa_server_init 86ebfedea0SLionel Sambucfunction, which will set up the random data and secrets. 87ebfedea0SLionel SambucThe challenge is generated using the 88ebfedea0SLionel Sambuc.Fn paa_format_challenge 89ebfedea0SLionel Sambucfunction. 90ebfedea0SLionel SambucThis will format the challenge into the buffer provided, 91ebfedea0SLionel Sambucand can be transferred to the client using any means. 92ebfedea0SLionel Sambuc.Pp 93ebfedea0SLionel SambucThe client reads the challenge, and produces a response 94ebfedea0SLionel Sambucusing the 95ebfedea0SLionel Sambuc.Fn paa_format_response 96ebfedea0SLionel Sambucfunction to format the response in the buffer provided. 97ebfedea0SLionel SambucThis response is given to the server. 98ebfedea0SLionel Sambuc.Pp 99ebfedea0SLionel SambucIn the server, the response is verified using 100ebfedea0SLionel Sambucthe 101ebfedea0SLionel Sambuc.Fn paa_check_response 102ebfedea0SLionel Sambucfunction. 103ebfedea0SLionel SambucIf a positive verification has occurred, the identity of 104ebfedea0SLionel Sambucvarious fields in the response can be displayed 105ebfedea0SLionel Sambucusing the 106ebfedea0SLionel Sambuc.Fn paa_print_identity 107ebfedea0SLionel Sambucfunction. 108ebfedea0SLionel Sambuc.Sh SEE ALSO 109ebfedea0SLionel Sambuc.Xr libnetpgp 3 , 110ebfedea0SLionel Sambuc.Xr sha1 3 111ebfedea0SLionel Sambuc.Sh HISTORY 112ebfedea0SLionel SambucThe 113ebfedea0SLionel Sambuc.Nm 114ebfedea0SLionel Sambuclibrary first appeared in 115ebfedea0SLionel Sambuc.Nx 6.0 . 116ebfedea0SLionel Sambuc.Sh AUTHORS 117ebfedea0SLionel Sambuc.An Alistair Crooks Aq Mt agc@NetBSD.org 118