381e7702103401d621877d869ecfa6b447fafe6d
authsetup contains all the funtionality needed to generate, load and save
private and public keys, and to lock and unlock the private key with a
password.
Private and public keys are used to authenticate the player to servers,
and are loaded from config/authprivate.cfg. Private keys can be stored
in an "encrypted with password" version - in which case the player has
to enter the password after game start. To prevent brute-force cracking
of the password, the key-derivation function uses a constant time to
encode (usually several seconds). Because of that, the decoding at game
start can be done in the background.
The private key is actually itself a public key generated from the
prepriv key. The prepriv key should be kept away from the computer, either
as hardcopy or on a thumbdrive. The prepriv key is not required to play
the game. It can be used to prove ownership of the private key, in case
the private key gets stolen. It can also be used to regenerate private
and public keys, in case they are lost. The prepriv key can also be
encrypted by its own password.
authsetup
checks private and public key and returns "1", if they match.
authsetup pre preprivhex [psalthex pwdcfg]
loads prepriv key into memory. optionally supports encrypted keys.
authsetup priv privhex [salthex pwdcfg]
loads private key into memory. optionally supports encrypted keys.
authsetup pub pubhex
loads public key into memory.
authsetup ppass preprivpass
decrypts prepriv key with password
authsetup pass privpass
decrypts private key with password
authsetup passd privpass [commandwhendone]
decrypts private key with password in background. optionally executes
cubescript command when done.
authsetup needpass
returns "1" if the private key needs decryption.
authsetup genpre [prelen]
generates new prepriv key.
authsetup genpriv
generates private key from prepriv key.
authsetup genpub
generates public key from private key.
authsetup newppass preprivpass [preprivfilename]
encrypts prepriv key with new password and saves the result to file.
The default filename is config/authpreprivate.cfg and an existing file
gets overwritten - but the former file content is kept and also written,
each line commented out.
authsetup newpass privpass [privatefilename]
encrypts private key with new password and saves the encrypted private
key and the public key to file. The default filename is
config/authprivate.cfg and an existing file gets overwritten - but the
former file content is kept and also written, each line commented out.
authsetup unarmed
sets private and public keys to a fixed value. For testing only.
Can be used to "log out".
authmemusage, authrounds, authmaxtime are only used, when new passwords are
created (authsetup new[p]pass). authmemusage is the number of megabytes
of RAM that are used for the password hash calculation. If authrounds
is zero (as is default), then the hash algorithm calculates as many
rounds as possible in the number of milliseconds specified in
authmaxtime. If authrounds is a positive number, then that is the number
of rounds to be done, regardless the required time. Note that, since the
password hash algorithm is not endianness-aware, it is not possible to
move an encrypted password to a machine with different endianness.
Moving between 32- and 64-bit machines should be no problem.
FIXME: the command is not blocked against use in multiplayer. It has to
be determined later, if this is a problem or feature. Especially
the background password calculation may be a problem.
DOCREF authsetup cryptodebug authmemusage authrounds authmaxtime
…
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="refresh" content="0; url=docs/index.html">
<meta name="description" content="Documentation index of the game AssaultCube @ http://assault.cubers.net/">
<meta name="author" content="Rabid Viper Productions">
<meta name="copyright" content="You may be able to redistribute this content under specific conditions.
Please read the licensing information, available @ http://assault.cubers.net/docs/license.html for the
conditions that would apply to what you may be redistributing.">
<title>AssaultCube Documentation</title>
<style type="text/css">
body
{
background-color: #222222;
}
</style>
</head>
<body>
<div>
</div>
</body>
</html>
Languages
C
57.9%
C++
27.6%
Shell
11.1%
Python
1.2%
Makefile
1%
Other
1.1%