Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts

    Blowfish math in native javascript

    All,

    Does anyone know of a web resource whereby the math of the blowfish cipher is spelled out? I saw via google that there is a blowfigh library for javascript!? What I would like to do is spell out the math literally in a native javscript function (no jquery).

    Is that possible? I would assume that it is, as js has all of the operators and built-in math functions to do this. I'm sure the code would be incredibly long, but that is irrelevant to me.

    thanks guys. input welcome. just using blowfish here as a trial run for what I'm doing.

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,302
    Thanks
    10
    Thanked 586 Times in 567 Posts
    did you say you saw one, and if so, what's the question?

    "javascript blowfish" in google gave me five different scripts above the fold...
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  • #3
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    yes I saw them too. here's a script I wouldn't know how to use because to me it just looks like a bunch of jargon:

    https://github.com/drench/blowfish.j...er/blowfish.js

    Obviously I could go through it and figure it out but that sure is a lot of code. I guess what I'm looking for might be considered a "readable" version of the blowfish cipher (in code), given an input string of ASCII chars.

    so essentially what I'm saying is that I would like to re-write it based on the WIKI article. Please don't respond and say that this is stupid. I already know this.

    So I want to use the bitwise operators and the mathematics functions in JS: http://www.i-programmer.info/program...ipulation.html

    ... to write the cipher code out. possible you think? I realize that the hardware has a lot to do with this, but really the only anomaly there is to make sure that anyone involved with this process has hardware that processes bits the same way. I've already covered that, and it is not an issue. Unless there's another one I don't know about?

    thanks. by the way, are you from IA?

  • #4
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,928
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Last edited by Philip M; 06-20-2013 at 07:58 AM.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #5
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    Phillip,

    Do you this implementation?

    http://old.nklein.com/products/blowfish-js/

    What I would have to do is stick all of this in with a single HTA file and embed the scripts there inside of a <script> tag. would that work you think? that's a lot of code to be inline in any app, but it's just messy.

    I'd like to get some sort of output at all, but the functions as they are (using the prototypes that is) don't seem to support this! They just seem to be arbitrary functions sitting there without any given instruction for input. Do you see that too?

    Or is that supposed to be acquired knowledge already by the user? Is this what they are assuming?

    thanks.

  • #6
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,928
    Thanks
    203
    Thanked 2,531 Times in 2,509 Posts
    Quote Originally Posted by ajetrumpet View Post
    Phillip,

    Do you this implementation?

    http://old.nklein.com/products/blowfish-js/
    Sorry, I have no experience of this. I simply pointed you to what seemed relevent resources.

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #7
    Regular Coder ajetrumpet's Avatar
    Join Date
    Jul 2009
    Location
    Iowa City, IA
    Posts
    407
    Thanks
    44
    Thanked 5 Times in 5 Posts
    that's OK Phillip.

    I am working on it right now. I am doing some testing based on the green boxes that are there on the page. This should be fine. Blowfish is unbelievable encryption! It's a bit overkill if you ask me, but then again I guess it isn't considered completely outrageous and stupid if long ago AES was established! Wow...sometimes I'm amazed by the overwhelming evil nature of intellectuals. Government is obviously the worst! but at any rate, rant over...

    thanks again for the links.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •