Slashdot Mirror


OpenBSD can encrypt swapspace

Continuing it's reputation for security, the OpenBSD kernel can now encrypt the contents of swap space, so that sensitive data can no longer be swapped to disk 'in clear', where it could survive reboots. The Blowfish cypher is used, as it is strong, fast, with a big key space. Obviously, there's a small speed penalty for this option. Note: The BSD section has been a little empty recently, due to illness. Thanks to all who enquired after me, I appreciate it :-)

41 comments

  1. Does BSD have anything like the ide-scsi module? by Anonymous Coward · · Score: 0

    I don't use OpenBSD, so I wouldn't know. But under Linux (this is *NOT* a comparison, folks, just an observation!), there's the ide-scsi kernel module (it came as part of the standard kernel source with 2.2.13, don't know about earlier versions). It basically allows you to treat a standard ATAPI device (such as a CD-R or CD-RW) just like a SCSI device; changes the major/minor numbers, everything. It has allowed me to use my ATAPI CD-R with cdrecord, no problem.

    Is there anything like that for BSD? I honestly don't know...

  2. Re:Does BSD have anything like the ide-scsi module by Anonymous Coward · · Score: 0

    Yes, that's where the idea in Linux came from, BSD.

  3. Yep: been there, done that by Anonymous Coward · · Score: 0

    For years now, Linux users could do this.
    We get our choice of crypto too, and can
    even encrypt a whole disk.

    Eat my turds, Satan!

    (UNIX, being castrated, didn't have children.
    Given the horns, I'd say your momma slept with
    the devil himself.)

    UNIX is a trademark licensed exclusively through
    The Open Group.

  4. Re:Linux needs some help by Anonymous Coward · · Score: 0

    Actually, I'm a commie.
    Commies values freedom, BSDL is freedom without stupid restrictions, unlike GPL.
    Btw, my girlfriend is from Sweden, so am I, so you might be right about that part.

  5. Re:Crypto Hardware by D.A.Alderud · · Score: 1

    In this paper you can read about implementation in FPGA.

    --
    "Last words are for fools who haven't said enough." - Karl Marx
  6. Re:Why?? by gmeb · · Score: 1

    Duh ! I suppose OpenBSD disabled the equivalent for /dev/mem & /proc/kcore for security reasons as well then ? Otherwise your argument doesn't really make sense, does it ?

    --
    The angry man always thinks he can do more than he can. -- Albertano of Brescia
  7. Re:Why?? by PhilBrut · · Score: 1
    Then anyone who can get root access, even if only temporarily, can gain access to the swap file. And if you think gaining root access is impossible, it's time to wake up.

    True. But if root gets broken you're in trouble anyway.

    Or maybe more than one person uses this computer. What is your lab mate with a boot floppy doing while you're at lunch?

    Yep, realized that in the middle of class last night...

  8. Re:Why?? by Arandir · · Score: 2

    "But if root gets broken you're in trouble anyway."

    But root can get broken temporarily WITHOUT knowing the root password. Retrieving this off of the swap partition gives the cracker access anytime.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  9. Re:Does BSD have anything like the ide-scsi module by Anonymous Coward · · Score: 0

    up yo arse. openbsd doesnt even do smp yet.

  10. Re:Why?? by Arandir · · Score: 2

    Go found out a little bit more about security before you cast dispersions upon OpenBSD for being too paranoid in encrypting swap. I'll give you a hint: partitions are persistant.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  11. Re:Does BSD have anything like the ide-scsi module by Anonymous Coward · · Score: 0

    It doesn't do SMP, but it fakes IDE CD-ROM burners as SCSI perfectly.

  12. Re:OpenBSD needs some help by limpdawg · · Score: 2

    The best place to send it would be bkimmel1@mac.com

    --

    Nascantur in Admiratione. (Let them be born in Wonder)

  13. Linux can do crypted swap too by Anonymous Coward · · Score: 0
    Linux can do crypted swap too!
    Step 1;
    - create a crypted filesystem
    Step 2;
    - create a swapfile in the crypted filesystem
    Step 3;
    - do a swapon on that swapfile.
    Done!

    This issue was a topic a while ago in the Linux kernel mailinglist. Someone actually tried the steps mentioned above here and found that it works!

  14. Re:Why?? by Anonymous Coward · · Score: 0

    point is not moot.

    ANYBODY that gets their grubby hands on your hard drive can stick it into another box and "dd" the swapfile/swap partition off of it and subsequently peruse the contents thereof.

  15. Re:OpenBSD needs some help by NovaX · · Score: 1

    It looks like on DDN's forums, someone linked to both of them.. I think. I'm still downloading, to see. Oddly, my ethernet speeds seem to be tapping out at 6kb/s.. (a server I'm d/ling from now, at 6kbps, was in the 40s yesterday)

    http://daily.daemonnews.org/view_story.php3?stor y_id=515

    --

    "Open Source?" - Press any key to continue
  16. Re:Linux needs some help by TheCodeMaster · · Score: 1

    actually, commies don't really value freedom. They value communial ownership of the means of production (at least in the marx-derived version).

  17. This isn't news by Anonymous Coward · · Score: 0
    After all, it's well established that BSD is the true Unix heir, in heritage, philosophy, and design. Mind you that I don't mean to sleight the other true unices (Solaris, AIX, et alia), which are worthy in their own right, but OpenBSD is particularly proactive concerning security.

    I'm sure the linux "me too"ers will chime in here about this or that, but, in the spirit of proactivity, let me peacefully remind everyone that BSD's father is Unix; Linux's father is Minix. The apple doesn't fall far from the tree or (in the case of linux) the turd doesn't fall far from the asshole.

  18. Crypto Hardware by Bryan+Andersen · · Score: 2

    Now we just need someone Outside the US to design and make a PCI encryptor/decryptor board that supports blowfish. If I had the ability to program programible logic devices I'd think about doing this just for myself, but then I'm also in the US so if I did it, I couldn't easily post the design or export it. With current programible logic encryption rates over 1M bytes a second should be possible.

    Features that would be good. Write only key space. Space for a number of key sets. The OS can moderate who can use which key sets. It would use PCI bursting to transfer data to and from it. It would also need to handle common block chaining modes.

    I figure it could be done on one large FPGA or similar. It may require a bank of fast SRAM for buffer space, but I think it could be done without. The actual card size could be miniscule. No larger than the length of the PCI connector and about 40mm high. One could even support a number of different encryption/decryption methods. I'd like to see DES, Triple-DES, Blowfish, Two Fish, RSA and maybe a few others.

    1. Re:Crypto Hardware by penguinicide · · Score: 1

      Perhaps someone could hack the new programmable DSP chips/boards that Texas Instruments is planning on making.

      --


      penguinicide... when jumping out a window just won't do.
    2. Re:Crypto Hardware by Signail11 · · Score: 2

      It is quite obvious that you have little experience designing or implementing programable logic devices. 1Mb/sec is a *very* low target speed to shoot for if you're going to go to the bother of making a hardware encryption acceleration device. Blowfish is not especially well suited for hardware implementation; you need a 4K ROM to store the digits of pi and (this is the big one) 4K of RAM to store the key-dependent S-box. There are other ciphers that would be better uses of key space. Nonetheless, any decent implementation of a modern block cipher should be able to acheive at least 10 Mb/sec without pipelining or unreasonable use of chip space. With pipelining and appropiate interleaved encryption modes, (16x duplication of logic) I would think that 100 Mb/sec would not be an unreasonable goal, if not even significantly faster.

      Implementing RSA in hardware requires more finesse in that timing the carry-save delays and allocating space for multipliers becomes slightly trickier. The key operation is multi-precision modular exponentiation which can be done with general purpose hardware quite well. It doesn't make much sense to put in into a board devoted to symmetric algorithms.

    3. Re:Crypto Hardware by starman97 · · Score: 2

      You could use an Altera with onchip memory and a PCI controller as a single chip solution, or go with a
      PLX IOP480 which has an embedded PowerPC processor and an external memory bus. You could easily change your crypto program using one of these.
      I'm using a PLX9054 on a board with a PPC G3, they have really nice software support and DMA capability. I'll bet the G4 could really crunch some data with it's vector unit. 3x faster in Distributed Net numbers over G3 from what I've read.

      --
      Starman97@Gmail.com (bring it on spammers)
    4. Re:Crypto Hardware by phred · · Score: 2

      Speaking of Blowfish and block ciphers, Bruce Schneier has some very interesting comments on the convergence of stream and block ciphers in his newest monthly Crypto-Gram.

      -------

      --
      Bill Gates Is My Evil Twin.
  19. Why?? by Anonymous Coward · · Score: 0

    What is the point in encrypting swap space? I doubt many people will be sniffing your HD. It would make a little more sense to encrypt your filesystem with your personal emails, papers, copyrighted material :snicker:, etc-- but swap space??

    1. Re:Why?? by Bishop · · Score: 1

      Exactly! That is why some people want an encrypted swap file.

    2. Re:Why?? by Bishop · · Score: 1

      After a system crash, confidential information (pgp passwords) can be found in the swap file. System crashes are easily made: you pull the plug.

    3. Re:Why?? by Bishop · · Score: 2

      I hate to spell it out, but the idea is this: Alice is useing a computer. The computer could be a laptop, a workstation, or a server. Eve wants to know what Alice is doing. Eve causes a system crash by pulling the plug or battery on the computer. Eve gains console access to the computer through theft or ligitemate access. Eve scans the contents of the swap file to see what Alice was doing.

      By using an encrypted swap file Alice makes it harder (maybe impossible) for Eve to perform this kind of attack. This type of attack is particularly effective against laptops as they are easy to steal. If I had a laptop that contained sensitive information I would want to use bath an encrypted filesystem and an encrypted swap file. Yes I would take a performance hit. However if the laptop is stolen I am out a few thousand dollars but my sensitive information is safe.

    4. Re:Why?? by tardmobile · · Score: 1

      OpenBSD is not Linux. It's not made for desktop users and fairweather developers. It is made with security in mind. And now, it is that much more secure. Many people who use OBSD, and use it for it's secure nature, will benifit from this advance.

      --
      jhs
    5. Re:Why?? by PhilBrut · · Score: 1

      But that's a moot point if the swap device/swap file are accessibly only by root.

    6. Re:Why?? by Arandir · · Score: 2

      Then anyone who can get root access, even if only temporarily, can gain access to the swap file. And if you think gaining root access is impossible, it's time to wake up.

      Or maybe more than one person uses this computer. What is your lab mate with a boot floppy doing while you're at lunch?

      --
      A Government Is a Body of People, Usually Notably Ungoverned
  20. Re:OpenBSD needs some help by Anonymous Coward · · Score: 0

    How true, how true. Let us remember the words of our great socialist leader, RMS:
    Join us now and share the software
    You'll be free hackers, you'll be free
    Join us now and share the software
    You'll be free hackers, you'll be free
    Hoarders can make lots of money
    That is true hackers, that is true
    But they can not help their neighbor
    That's not good hackers, that's not good
    When we have enough free software
    At our call, hackers at our call
    Then we'll kick out those dirt licenses
    Evermore hackers, evermore
    Join us now and share the software
    You'll be free hackers, you'll be free
    Join us now and share the software
    You'll be free hackers, you'll be free

  21. Re:OpenBSD needs some help by Anonymous Coward · · Score: 0

    and its even scarier when you hear the techno version! Now he just needs to rap it.. I mean if you can do a punk version of 'Leaving on a Jet Plane'.. almost anything is possible.

  22. Linux needs some help by Anonymous Coward · · Score: 0

    If someone had posted someting like this
    "We, the the socialist Linux users of the world demand that Linux license everything that is encrypted into the swap space be licensed under the BSDL. Only by doing this can free health care, and the elimination of poverty be realized in the United States. Otherwise we will we be stuck in the 20th century forever."
    would be marked as flamebait and would get a list of flames longer than the XFree86 sourcecode.
    Fortanly, the OpenBSD community is smart enough not to endorse in flames.

    1. Re:Linux needs some help by Anonymous Coward · · Score: 0

      LIER!!!
      You are in favor starving little children by denying them their basic human rights. I bet you get massaged by the same Swedish masseuse Bill Gates does. You evil capitalist you!!!!

    2. Re:Linux needs some help by Anonymous Coward · · Score: 0

      We do! Read the manifesto.

      Communism is Marx's vision of how to accompish anarchy, anarchy that works.
      And anarchy is total freedom.
      All real communists want anarchy, as anarchy is the goal of communism.

      I don't want to see anyone that hasn't read the manifesto telling someone else what communism is.

    3. Re:Linux needs some help by TheCodeMaster · · Score: 1

      I don't want to see anyone who has only read the short, polemical work of a generally complex philosopher tell me what he said. Saying that Marx's work is a vision of how to accomplish anarchy demeans the insightful analyses of history and economics, in addition to being merely incorrect. His work is descriptive, perhaps predictive, but it is not prescriptive. The sweeping spectre of communism is not something he's encouraging so much as assuming will happen, in the context of his dialectical materialism. Your view of his work makes him little more than the intellectual heir of radical crackpots, rather than the logical development and maturation of the work of Hegel. Please learn more about Marx before telling me to learn more about Marx. Thanks.

    4. Re:Linux needs some help by Anonymous Coward · · Score: 0

      I think I've read far more Marx and/or Engels than you've done.
      Also, you clearly have no idea what anarchy really is, or else you wouldn't view anarchists as radical crackpots.

      You got your Jesus
      And I got my space
      You got your reasons
      And I got my case

    5. Re:Linux needs some help by TheCodeMaster · · Score: 1

      I get it. You really don't know what you're talking about and I've caught you. I thought as much. Thanks for playing.

    6. Re:Linux needs some help by Anonymous Coward · · Score: 0

      No, that just a little joke as that you seam to think anarchy is the same as punk rock.

  23. Re:OpenBSD needs some help by limpdawg · · Score: 1

    Do you have a url to the techno version?

    --

    Nascantur in Admiratione. (Let them be born in Wonder)

  24. OpenBSD speed by toaster · · Score: 1

    I don't know about anybody else but I wish OpenBSD
    would do a performance audit to go along with their much touted security audit. I just switched
    to NetBSD x86 and noticed a substantial speed improvement. I also like the lack of hype and commitment to clean code. The userland tool chain
    is very polished. Now I just have to figure out
    how to burn CD-Rs from my atapi CD-RW. Last I heard cdrecord didn't like anything but scsi.
    -Toaster

  25. Re:OpenBSD needs some help by NovaX · · Score: 1

    nope... just the file. Give me an email address or the like. Its very.. uhh.. cultish.

    whoohoo.. /. logged me in! And I was getting annoyed that it was to dumb to read its cookie...

    --

    "Open Source?" - Press any key to continue