There's an obligatory xkcd somewhere on this...
422 karma · joined September 14, 2010
There's an obligatory xkcd somewhere on this...
Bering a good human calculator is unlikely to result in stellar programs. Having a good grasp of how to arrange and communicate your ideas, as is required in mathematics, will help your programming hugely.
Yes, there's a large gap between what is acceptable in mathematics and what's acceptable in programming, and the types of problems you're likely to encounter, but fundamentally, you'll be communicating ideas to other people and to your compiler.
Source: Computer Science and Mathematics degree, now working as a researcher.
* Do not use plain SHA-256. Use a KDF, like PBKDF, bcrypt or scrypt.
* There must be some efficient method by which I can re-issue compromised passwords.
* For convenience, allow me to have different character sets for different sites, and different lengths.
* Make the default to be going directly into my clipboard.
* A way to recover from the compromise of the master passphrase
The way I would do this is to have a small file, detailing, for each door_id: * Random seed. The is effectively a version number. Change this, and get a new password for only that door_id.
* Character set
* Length
This file, although not advisable, is not enough to break the other passwords generated. Given a strong enough passphrase (I'd say... a 5 or 6 word diceware password), it can be synced to all sorts of places, kept on a USB stick, etc.I cannot, off the top of my head see any way to re-issue the master passphrase effectively.
As it stands, I could not, in good conscience recommend anyone use pastor as it stands. Although a few, relatively minor, modifications, could make it quite an interesting tool.
Using a file on disk to keep track of version numbers, lengths, and character sets seems quite extreme, given the aim is to remove the need for files on disk!
Perhaps some other way of keeping track of these, without the user needing to remember them could be devised?
* Complex reporting requirements with an extremely vague specification on a completely normalised database. The sheer quantity of various joins was fun. There must've been a better way
* Optimising certain read operations which operated over a potentially large dataset.
* Providing an efficient full-text search based around lucene which had some pretty interesting requirements, that came down to lucene filters in the end.
Overall, it's mostly been about optimisation. And that is simply measure, measure, measure. Doing things blindly gets you no-where.NaCl's goals are vastly different to those of SSL/TLS. SSL/TLS aims to provide a simple, clean interface with sane defaults for the majority of simple use-cases, whereas SSL/TLS aims to provide an interface with near-infinite flexibility for the case of providing an encrypted, authenticated tunnel.
NaCl also deliberately does not support lots of ciphers, as that makes it easy for developers to choose poorly, for example, (Alleged) RC4, as is supported in OpenSSL.
This seems to be expected behaviour for generating RSA keys. An RSA key of length 4096b does not provide you with a security level of 4096b. That is, you don't have to straight-up guess the keys, you work at it via factorisation.
The issue is arising from the fact that entopy and key length are both commonly measured in bits. The entropy of an RSA key is much lower than the key length. 256b of entropy seems to be more than reasonable at first glance.
Normally, I would not defend openSSL, but I will do so here, having not even looked at the responsible code (nor has the submitter of this bug), and not even looked at the mailing list link.
Seriously, do not panic, let the cryptographers look at this and decide if it's really an issue. It's probably good that they're getting 256b of entropy from urandom, it's likely that they're seeding a CSPRNG for prime generation & testing.
I would wager some small sum on this being closed by the end of the week, and us looking back on this and shaking our heads at the uninformed knee-jerk reaction of people in here:
"If I ask for a 4096-bit key, I should get one, or an error message. I shouldn't get a 256-bit key that looks like a 4096-bit key." -- taejo, 15 minutes ago
Having <input type='challenge' algo='xxx' challenge='reallylongrandomchallengetoken'> would work better than yours, I think?
There's also nothing stopping the user using a "password", where that password is fed through a KDF and then used to generate the relevant private key (all done client side) -- but this is only as strong as the password used, so a really savvy user would just generate the private-key really well, and store that in a similar way to the way SSH keys are stored (i.e. passphrase). Non-savvy users can generate it a-fresh every time.
But aren't we just re-implementing client-side SSL certifications?
"... thus bringing this absurdist tirade to a close and showing the law for what it really is: Propaganda codified as law."
The clue is in the "absurdist tirade" -- this is a reduction of the current media coverage of the law into implications which seem technically plausible.
My personal issue here is that it seems that W3C is going against it's own founding principles, running a committee that's biased towards the content-industry.
And therein lies the problem of disaster recovery. Even if you have a catastrophic bug, you should not be losing 6 months of data.
1. Discover vulnerability 2. Inform vendor, tell them they'll have x weeks before general disclosure 3. After x weeks, post it to the relevant place on seclists.org
You do not need to know the entire history of the foo object, only the intrinsic state and the arguments to the current method call to determine it's behaviour. This means that a method on an object can be modeled as add :: (foo, integer) -> integer.
That is not to say that this is necessarily easy, and yes, singletons do complicate this by making it difficult to know exactly what the intrinsic state of an object is as they essentially hold a reference to something which may be modified by something other than the foo object.
I fully agree that functional programming seems like a good idea right now, but I would also say that this particular problem is mainly due to the programmer failing to adequately control and rein in extra, unnecessary state.
The tests would go something like this: 1: SmallCheck exhaustively tests the small cases 2: JUnit/TestNG tests the main use-cases. 3: QuickCheck produces a lot of random tests and hammers the APIs.
Sadly (for Java at least) this appears to be a rather difficult ask.
Similarly, if you decide that you don't like PostgreSQL and want to move to MySQL. You can go through your code and change all of your SQL to match the PostgreSQL dialect. Or (with Hibernate) you change one configuration parameter (the hbm2ddl one) to use the MySQL dialect as opposed to the PostgreSQL one.
Hibernate (I'm using Hibernate a lot, because it's the one I use at work, so I'm quite familiar with it) can also be configured to check the database schema at start, update it to match your models, create a new schema or create a new schema and schedule it all to be dropped when your application terminates. This is useful, because your test configuration can be create-drop, and your live can be validate. When upgrading the live system, you can just redeploy with "upgrade" as the configuration.
In short, ORMs do have a lot of behind the scenes magic going on, but they can also offer developers a heck of a lot. Not to mention that they're thoroughly tried and tested bits of code. Hibernate even has the capacity to take on various transaction managers (Bitronix allows you to do one transaction over two databases, even if those databases are from different vendors).
Key combos:
Ctrl+Alt+* (num pad) Ctrl+Alt+Shift+8
Both with numlock on and off.
However, there should be a reasonable limit, whereby if the item is >£x value, or is claimed to be an antique (or similar), an independent professional who can identify it will be hired -- and charged to whoever they side against (i.e. whoever made the false claim).
Similarly, to become very proficient with code, read other people's code. Read code written with the help of a framework, read code written in Python, try to read some in a functional language, try to read some C for an embedded system (FreeRTOS, perhaps?).
But similarly, don't just read. You need to be practicing your writing of code too. Write small things, an AVL or Red-Black tree in C, a small web server in Python, an IRC bot in Objective-C are all semi-decent pedagogical projects. You don't need to devote your life to a small project, just knock it out over the course of a couple of weeks to become familiar with the idioms.
Investigate asymptotic complexity, basic data structures (Arrays vs. Linked lists, Hash Tables vs. Binary Trees (balanced and unbalanced), various methods of queuing, stacks), you'll need to know the standard algorithms (binary search, various sorting algorithms, some search algorithms, etc.)
The only way to improve is to continually try to improve. Write code, read code, read books, try to implement the ideas from the books. AI, compiler design and implementation, functional programming, hardware (all the way down to signal processing and digital electronics, see if you can't design a programmable analogue computer!)
For example, group and ring theory often starts with the concept of symmetries, but it can then be shown, through an equivalence (or in mathematical terms, an isomorphism) that these have a relationship to polynomials. From that, we then easily show that there is no general formula for polynomials of degree greater than 5. Two vastly different fields, actually sharing something, and having a very useful result. Similarly for finite state machines and monoids.
If you can express something as something else, you have the opportunity to shed light on it's structure and hence learn something new about it. Yes lots of things share that structure, it just so happens that monads are quite a general structure, that doesn't mean that no interesting results are attached to them.
"If you can write a compiler, you can write any program."
Hence, I'd get compiler books. Modern Compiler Implementation in Standard ML, SICP has a couple of sections on compilation, there's a computational theory book that I don't have on hand which would be useful to this end too.
Similarly, C# is a nice language, but I'm not (personally) overly keen on Visual Studio, I like smaller IDEs (personal preference here!).
The main issue that I see is the obsession with integrating everything with Windows. Notice how iTunes is cross platform(ish)? Python is cross platform? Apache is cross platform? Chrome & FireFox are cross platform? I don't think that it's an accident that those are fairly popular -- any one who uses them is not in inherently tied down to Windows, Mac or any other operating system.
I've said this about IE9, cross platform is generally better. Broaden your application's user base and correct the issues with advertising and you'll stand a real chance at turning things around, in my opinion.
Contrary to popular belief, throwing money at an issue does not correct an issue. With the creative markets, you'll need to get hold of genuinely creative people -- scout university campuses, advertising agencies (and anywhere else) and find those who are really passionate about creating something special.