FYI, just adding a "Type ? for help." after "Invalid selection." would improve
the situation massively.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Sep 26 2014
Really, which prompts are those?
$ sh
$ ?
sh: 1: ?: not found
$
127
$ ed
?
?
1
$ bash
$ ?
bash: ?: command not found
127
$ zsh
% ?
zsh: no matches found: ?
%
1
$ man man
?
Pattern not found (press RETURN)
$ bc
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
?
(standard_in) 1: illegal character: ?
$ gdb
GNU gdb (Debian 7.7.1+dfsg-3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) ?
Undefined command: "". Try "help".
(gdb) quit
Fuck, even vi tells me "type :help<Enter> or <F1> for on-line help"
$ python
Python 2.7.8 (default, Sep 9 2014, 22:08:43)
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
?
File "<stdin>", line 1 ? ^
SyntaxError: invalid syntax
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
λ: ?
<interactive>:2:1: parse error on input `?'
λ:
Leaving GHCi.
You responded to my previous suggestions, and this is my next iteration, with me
trying to take into account your comments.
I find that making related options visually related, helps the user to better
intuitively understand what they do. The current options don't do this.
You also had a comment along the lines of "sign is not accurate because there's
also certify and authenticate", but a few current options also have this flaw. I
think it's OK, but it's better to do this consistently.
I could not easily figure out what I was supposed to infer from the source code
of gpa or gpgme, but after playing about with it, I suppose I can detect the
error by noticing that the next GET_LINE issues a keyedit.prompt rather than
continuing with the workflow. This means I will have to write some state-keeping
logic instead of merely switching on the GET_LINE, and all users of this
interface will need to implement a similar thing.
To reduce the complexity for scripters here, might I suggest adding an extra
parameter to GOT_IT to explicitly communicate to the client script about any
errors? At least from the gpa/gpgme code it seems there is a generic parser that
can cope with extra parameters to any status line.
If anyone is affected by this (I don't know of others using this interface),
they can easily rewrite their parsing code to cope with both the old and new
GOT_IT lines (with or without a parameter).
BTW, this is the sort of thing that documentation would be helpful for.
Sep 25 2014
Nope. We discussed this already at the ML.
Using a question mark on prompts is a common behaviour for at least 35 years.
Thus one can expect that.
That is exactly the idea. Walk it through manually and you see what you need to
type. Adding docs bearks the risk that the docs is not in sync with the code
and thus we would need to run tests to make sure this is the case. The order of
the prompts depends on so many factors that a complete documentation si not
possible.
Sep 24 2014
The same applies for the key export prompt, too. Currently it says something
generic about "the key has no passphrase, please provide one to export".
(My suggested examples also have some visual similarity between actually similar
options.)
Sep 17 2014
What I implemented now is a simple one item cache for the last used passphrase.
This works in all standard cases. Trying more keys is not possible because
unprotecting a key introduces a delay to help against dictionary attacks.
Meanwhile done.
Sep 10 2014
Sep 8 2014
With slightly over 1000 keys in my keyring, it is surprisingly slow to list all
865 sigs on my key:
$ time gpg --list-sigs --with-colon $keyID >/dev/null
real 0m22.061sAt first I naively thought the major bottleneck was caused by the trust
calculation, but changing the trust model doesn't seem to help:
$ time gpg --trust-model=always --list-sigs --with-colon $keyID >/dev/null
real 0m22.157sWhile --fast-list-mode downs the execution time by a factor of 100 (0m0.220s),
the key UIDS are not displayed (which makes it impossible to know on which of
them the signature was added). I didn't benchmark the difference myself but I
don't expect it to be significant, as if I got RFC 4880 right, the UID packets
are being looped over when gpg inspects the signature packets. (OTOH the
primary UID of the signing keys are not printed either when --fast-list-mode is
set, which I can understand as doing so would require costly lookups through
the keyring.)
I wish the user had more fine-grain control on what to skip with
--fast-list-mode.
Thanks!
Guilhem.
Sep 7 2014
The patch v10 should now cover all change requests from Werner as documented in
the cover-letter.
However, I am not fully sure about the interface yet: the GCRY_DRBG_REINIT is
now solely limited to normal DRBG use. I do not see how that can be merged to
existing random interfaces.
The CAVS test interface is now isolated to the control value 75 similarly to the
X9.31 testing approach. However, the current approach triggers a compile time
warning about the undefined enum 75.
See [1] in libgcrypt/test/ for a test application that uses the DRBG in normal
mode and in CAVS test mode -- search for gcry_control.
Tested:
- 32 / 64 bit
- CAVS testing on both arches
- brief stess testing by creating 200 MB of data and checking it with ent to see
that the output function is not broken
Sep 3 2014
Thanks.
re: indent: You mixed prototype and functions and thus by quickly browsing the
source I noticed the prototype - which are correct.
re: API it is a bit hard to check from just the patches. Thus I suggest that I
apply your next patch and then look again at it.
re: reregssion test: We can use a secret API for that so that it is not part of
the stable ABI. See for example tests/fipsdrv.c:init_external_rng_test
Please do not use C99 feature like // and struct init using symbols. I am
willing to fix that, though.
re GPL: will do
re one patch: will do
I will make also the requested code changes. Though, the indentation makes me
wonder. As I am not used to this indentation, I used the help of indent wit the
following command as specified on the GNU home page: indent -nbad -bap -nbc -bbo
-bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs
-psl -nsc -nsob. Now, what is wrong with the indentation?
Re reusing the API: I am wondering where I do not reuse the API? The normal
usage is via the gcry_randomize function. The external hook is used for:
- changing the type of DRBG (note, the code implements many random number
generators)
- allowing the use of the personalization string / additional info string (I
would not know how to use that with gcry_randomize.
- allow the CAVS testing to be performed.
If you have suggestions on how to cover that using existing APIs, I would be
very much interested in it.
One last thing: Libcrypt is under the LGPLv2+ but your alternative license is
under an unspecified version of the GPL. Can you change the alternative license
to the "GNU Lesser General Public License as published by the Free Software
Foundation; either version 2.1 of the License, or (at your option) any later
version."?
I would also prefer one patch and not a set of patches.
I have alsready pushed the GCRYCTL_DRBG_REINIT constant so that the value is
reserved.
The patch needs some rework: At a first glance gcrypt.h has new strucures using
symbols not from the gcrypt name space (_gcry or gcry prefixes). I noticed
quite some other Linux specific stuff like __u8 instead of unsigned character,
different indentation, and remove of page breaks (^L).
I have not looked at the API but I wonder why you don't re-use the existing
random API. Adding new functions for your RNG is not a good idea - unless there
is a real good reason for it. Exposing internals in the API is a no-go.
Sep 2 2014
Changes v9:
drbg_int2byte replaced by drbg_cpu_to_be32 and the use of be_bswap32
and be_bswap64 for converting an integer into a character string.
Besides performance increase, it fixes the conversion on 32 bit machines.
Tested:
- on 64 and 32 bit
- CAVS on both arches
- sanity tests on 32 and 64 bit
Sep 1 2014
v8 does not compile on 32 bit
Update of the entire patch set to version 8:
Fix the functions drbg_max_addtl, and drbg_max_requests to not overflow
size_t in 32 bit. Furthermore, the per-DRBG option for maximum requests,
maximum request bits and maximum length of additional information is removed
in favor of a global setting. The change only affects drbg.c
Note: only the patch 0001 is changed compared to version 7 of the patch set.
Aug 29 2014
Meanwhile implemnted in all branches.
Aug 28 2014
On 32 bit, a problem was just discovered in the kernel development branch: see
discussion in https://lkml.org/lkml/2014/8/26/59.
The base line is that the bit shift in drbg_max_addtl and drbg_max_requests are
stored in a size_t which is 32 bit on 32 bit machines. Yet, the bit shift is
larger than 32 bit. It will be fixed in the next installment of the patch.
Aug 22 2014
Aug 21 2014
To go into master.
Please send a DCO to gcrypt-devel and ask for a review of the code.
Aug 10 2014
Aug 6 2014
There are no known attacks on SHA-1. MD5 is disabled anyway in recent versions.
But please continue at gnupg-users - if you like.
Thank you for the prompt response.
I am familiar with the standard. The only violation of a MUST I'm aware of is that
recipient and personal digest preferences are ignored for hashes with known attacks;
perhaps some of these changes cause GnuPG to behave badly in other cases?
This has been discussed at gnupg-users at lengths. You need to read the OpenPGP
standard to understand some of the defaults. For the others you may start yet
another disucssion thread at gnupg-users.
re 4) The iteration count used depends on the machine.
Aug 5 2014
IIRC, there is a need to allocate a new console or something like this. It is
too long since I studied this and concluded it is too much work and English
users won't appreciate it anyway ;-)
Aug 4 2014
I don't think switching the console to UTF-8 is the real problem here.
At least just using chcp is not enough. Fonts do also factor into this and this
is where it gets weird:
If you run chcp 65001 and have a raster font selected the output is garbled.
If you then switch to a truetype font the output is correctly interpreted.
Now if you run the command while already having a truetype font selected the
output is garbled again but differently.. o.O
And looking at common/utf8conf.c there is already code that tries to handle
different Console Output Codepages but appearently there is a bug somewhere in
there :) (Or that code is not used / respected)
You probably need a helper. I have no idea whether such a tool exists. Windows
System Programming should have all the details.
Jul 28 2014
What is the best way to switch the console to utf mode?
Should someone use the chcp command and how?
Anyway the default behaviour is surprising for users, so from my point of view,
it should be improved somehow. A good documentation how to switch would only
be a second grade solution. A better one would be if the .exes would switch the
code page themselfs, I assume.