An Emacs Crash Course

Andrey Kotlarski has posted a very nice Emacs Guide on github. He says he wrote it for his coworkers after he got tired of being asked to give introductions to Emacs. It’s the perfect guide for someone who wants to get a feeling for Emacs, its capabilities, and how it works.

The guide is divided into 8 sections:

  1. Introduction
  2. Practical essentials
  3. General tips and tricks
  4. Programming tips and tricks
  5. Documentation
  6. Random
  7. Emacs for black belts
  8. Where to go next?

Even if you’re an experienced Emacs user, the guide is worth a read; you may learn something you didn’t know. For example, you can get information on “interesting” files in a directory under version control with 【Ctrl+x v ddirectory-name. The guide also points out some useful packages such as undo-tree and wgrep.

Additionally, the guide covers Org mode. It is, itself, written in Org mode and exported to HTML. The finished product is a nice illustration of how good an exported Org document can look. You can see how it was formatted by looking at its Org mode source. Definitely worth a read and handy to have around for those times when you have an opportunity to evangelize.

Posted in General | Tagged | 1 Comment

Hashing Passwords: An Object Lesson

Irreal regulars know that I periodically go off an a rant about the proper hashing of passwords and the dire consequences of failing to do it correctly. Not even I, however, could have imagined that Cisco would get it wrong. And not just a little wrong but massively and totally wrong.

In fairness, I should say up front that Cisco has acknowledged the problem and issued a bulletin on how to detect if a given piece of equipment is affected and how to deal with the problem if so. Also, Cisco is saying that the problem is an implementation, not a design issue.

With the Cisco IOS 15 codebase, a new type of password—Password Type 4—was introduced. Apparently, the design called for this to be a SHA256-based PBKDF2 hash with an 80-bit salt and 1000 iterations. The idea was to replace the weaker Password Type 5, which is an MD5-based hash that was salted and repeated 1000 times. That makes sense but unfortunately the implementation merely hashed the unsalted password with SHA256 one time. The result is a password that is easily broken as demonstrated by Philipp Schmidt and Jens Steube.

It’s hard to understand how this sort of thing could get by QA. Any time you change a cryptographic primitive it is, or should be, a big deal that requires careful scrutiny and testing. If, indeed, the design called for PBKDF2 hashing, it’s hard to see why the developer would use a single pass of SHA256 instead and how that error could get by any serious code review. If the design didn’t call for PBKDF2, it’s equally hard to understand why any developer with even a modicum of security awareness would not raise an alarm. This is not new stuff. The ideas have been around for a long time. Even the original Unix DES-based password hash from the 70s used multiple iterations and a salt.

The lesson is clear. Unless you, too, want to be the object of near universal derision (and probably fired) use one of the accepted methods for safely storing passwords. Don’t just encrypt them, don’t just run them through a single pass of some hash, and for goodness sake don’t store them in plain text.

Posted in General | Tagged | Leave a comment

A Talk on Lisp Machines

Over at LoperOS they’ve put up a video of a talk that Kalman Reti gave last year at the Boston Lisp Meeting. The talk is about the Symbolics Lisp Machines and includes a demo of the original software running in an emulator on a modern laptop. Reti was a developer at Symbolics and is very familiar with the machines and their history.

As the talk makes clear, it’s incredible how advanced those machines were for their time. In the 1980s they had several features that we consider standard today but that existed virtually nowhere else at the time. The systems came with bitmapped displays, a three button mouse, compilers for several languages, a windowing system, and an advanced file system.

I found the history very interesting but the real treat was the demonstrations. If you forget about the monochromatic display and old style window decorations you might think you were watching a modern demonstration of some advanced Emacs debugging session. If, after watching the video, you’d like to try the emulator yourself, there’s some information about it on the CLiki, including information on how to get the software and set up the emulator.

The talk is about an hour and a quarter so you’ll need to block out some time but I found it well worth the investment.

Posted in General | Tagged | Leave a comment

Analysis of the Gauss Malware

Over at Ars Technica Dan Goodin has a nice article analyzing the Gauss malware. Gauss appears to be related to Stuxnet and internal code signatures suggest that its provenance is the same1. Although Gauss was discovered last year, very little is known about its purpose or capabilities.

That’s because its payload—or more accurately, its warhead—is encrypted. Gauss appears to be looking for computers used for a specific application. It concatenates PATH and program directory names, adds a salt and hashes the results. If the resulting (key stretched) hash matches a compiled-in constant, Gauss has found the program it’s looking for. Then it hashes the same PATH and program name with a new salt and uses the result as a key to unencrypt the payload. Despite significant and sustained effort, researchers have not been able to find the key and thus have no idea what the payload is intended to do.

Goodin’s article is interesting and informative. If you have an interest in security, or just want to see how someone might go about protecting a piece of software from prying eyes, you’ll enjoy it.

Footnotes:

1 Said to be the United States and Israel.

Posted in General | Tagged | Leave a comment

Tilting At Windmills

If you enjoy charging windmills and otherwise taking on semi-hopeless causes, you might consider signing the petition to save Google Reader. So far there have been over 100,000 signers. In all honesty, it probably won’t do much good but at least your voice will be heard and perhaps Google will come to understand, if only vaguely, what happens when they lose the trust of the so called “influencers” on the Internet.

Posted in General | 5 Comments

Secure Communications Apps

Over at A Few Thoughts on Cryptographic Engineering, Matthew Green has a useful review of some secure communications apps. He looks at

  • Cryptocat
  • Silent Circle
  • RedPhone
  • Wickr

from the standpoint of code quality, encryption protocols, and ease of use.

Interestingly, Green examines the apps from the point of view of “should I use this application to fight an oppressive regime?” It’s not a frivolous question. Citizens fighting and journalists covering those oppressive regimes need to communicate and if their communications are not secure, their lives and the lives of others could be at risk. It also explains his emphasis on ease of use. Most revolutionists and journalists are not technically sophisticated and are especially prone to using crypto applications in a non-secure way.

If you’re looking for a way to keep your communications private—even if you’re not trying to overthrow a government—you should take a look at Green’s post. In addition to providing a review of some of the leading applications in the field, it shows you what sort of things to look for and what sort of questions to ask.

If you like his post, you might also enjoy this video of Green delivering a talk on the current state of cryptography. If you depend on cryptography in your day-to-day activities you will doubtless find it enlightening (and disturbing).

Posted in General | Tagged | Leave a comment

Git-Gutter

If you liked the functionality I described in vc-annotate, you might also like Syohei Yoshida’s git-gutter. It’s a port to Emacs of the Sublime Text plugin of the same name. The idea is that it marks changes to your files in the fringe so that you can see at a glance how the file is evolving. As the same suggests, it works only with git.

There are a lot of options that determine how the changes are marked so if you want fancy symbols instead of the traditional + or -, you can have them. Of course, you don’t get as much information as vc-annotate gives you but you can see what parts of the file have changed (and how) anytime you have git-gutter toggled on. In that sense, it seems like a nice adjunct to vc-annotate. There are screen shots at the link so you can get a sense of what it looks like in action.

Posted in General | Tagged | 2 Comments

Google To Kill Google Reader

Google has announced that they are shutting down Google Reader in July. I spend a lot of time in Reeder, which depends on Google Reader as a backend. I’ve seen some suggestions for alternatives—NewsBlur seems to be an early favorite—but I haven’t decided on a course of action yet.

If any of you have experience with other readers and are willing to offer your wisdom, please leave a comment. Maybe it’s only us nerds who care about RSS these days but I don’t know how I can live without it so I definitely need a replacement. One thing for sure, I don’t want to go back to using Safari and never having the feeds in sync between my Macs and iOS devices.

Again, if you have any advice, leave a comment.

Update: (Via Charlie Stross) Even Hitler is upset.

Posted in General | 1 Comment

Big Media and the User Experience

Those of you who have been around Irreal for a while know that one of my favorite comics from The Oatmeal deals with what happens when an otherwise honest person tries to buy a video of Game of Thrones. It perfectly captures what a typical session of dealing with Hollywood and other big media conglomerates is like.

Of course, it’s just a cartoon so maybe this was The Oatmeal taking a little creative license and exaggerating a bit. Actually, it turns out it wasn’t. In a case of life imitating art, Martin Belam recounts what happened when he tried to redeem a certificate for a digital download that he got when he purchased a Doctor Who DVD. It’s an almost perfect recapitulation of the Oatmeal cartoon right down to the ending where Belam gives up and Googles the torrent. Be sure to take a look at the comments too. One commenter reports that he did make it through the ordeal only to discover that the video was of exceptionally poor quality.

I don’t understand all this user hostility on the part of big media. Hanlon’s Razor councils that this is probably just stupidity but, really, it’s not as if these people don’t understand technology—they have, after all, helped invent some of it. Here, by way of a caution for them, is some more Oatmeal that can serve as a prophetic warning.

Posted in General | Tagged | Leave a comment

Emacs 24.3

By now you all probably know that Emacs 24.3 is out. This is a substantial release with lots of new goodies. I could write a long blog post about them but fortunately Mickey has has already done the work so I can be lazy.

As usual there was no problem compiling and installing Emacs. For OS X it’s just

./configure --with-ns
make install
cp -R nextstep/Emacs.app /Applications

If you’re on a different platform, just follow the directions in the INSTALL file.

This time I did have configuration problems. The first thing that happened was that Emacs couldn’t activate org2blog during initialization because it couldn’t find org. Of course, org was there but it wasn’t being managed by ELPA so I set it to be loaded by ELPA. That didn’t bother me because I’d been meaning to move the rest of my packages over to ELPA anyway. After that, everything loaded without problem. I started happily writing this post but when I went to insert the above link to Mickey, I got an error complaining that org-no-popups was not a valid function. After a little investigation I discovered that the Org folks are recommending against loading org with ELPA because of this error—they claim it’s a problem with ELPA. Now I was back to org2blog not loading. I moved that out of ELPA too and everything starting working fine.

I’d rather have everything in ELPA but I can live with the current situation. At least everything is working again. The takeaway is that if you’re an Org user (and are loading the latest version rather than the builtin) you may want to move it out of ELPA.

Once I got past the initialization problems, everything ran fine. As I said, this is a substantial release so it’s worth getting it installed as soon as you can find the time.

Posted in General | Tagged | Leave a comment