lisp, des and bricscad

please someone take a look at this thread

https://www.theswamp.org/index.php?topic=59747.0

Comments

  • If you've found a deficiency in .DES encryption, then it would be best to raise a support request with Bricsys.

    Raise a support request on LISP.

    You will be able to talk to them more plainly on the issue you've found and hopefully get it fixed.

  • I did a bit of searching and found this. https://www.codeconvert.ai/lisp-to-csharp-converter

    I would appreciate if some one could see if its useable, I dont program in C.

    ; goes through all layout tabs and zooms all
    ; By Alan H june 2011
    (defun c:zall ( / d curtab)
    (vl-load-com)
    (command "_.pspace")
    (setq curtab (getvar "Ctab"))

    (setq this_dwg (vlax-get-acad-object))

    (foreach d (layoutlist)
    (setvar "CTAB" d)
    (COMMAND "pSPACE")
    (command "zoom" "C" "400,277" 750) ; in case junk around title block
    )

    (setvar "ctab" curtab)
    (princ)
    )

    Code produced.

    using Autodesk.AutoCAD.ApplicationServices;
    using Autodesk.AutoCAD.DatabaseServices;
    using Autodesk.AutoCAD.Runtime;
    using Autodesk.AutoCAD.EditorInput;

    public class ZoomAllLayouts
    {
    [CommandMethod("ZALL")]
    public void ZoomAll()
    {
    Document doc = Application.DocumentManager.MdiActiveDocument;
    Editor ed = doc.Editor;

        // Switch to model space
        ed.Command("_.pspace");
    
        // Store the current tab
        string currentTab = (string)doc.Database.GetVariable("CTAB");
    
        // Get the layout manager
        LayoutManager layoutManager = LayoutManager.Current;
    
        // Get the layout names
        foreach (string layoutName in layoutManager.GetLayoutNames())
        {
            // Set the current layout
            layoutManager.CurrentLayout = layoutName;
    
            // Switch to paper space
            ed.Command("_.pspace");
    
            // Zoom to specified area
            ed.Command("zoom", "C", "400,277", 750);
        }
    
        // Restore the original tab
        layoutManager.CurrentLayout = currentTab;
    }
    

    }

  • encrypting a Lisp file for Bricscad,

    and "converting" this file to C#

    are TWO SEPARATE TOPICS...

    and the second one

    (even though it's an interesting thing)

    is not

    the solution to the first one ...

  • ALANH
    edited September 9

    I don't understand why the response yes it has been disclosed that des is not maybe secure, but higher level languages like C# are more secure so it may be a way of securing the code you have invested your time and effort into.

    The convert to C is offered as an alternative to making des files. I don't use Visual Studio so don't know next step.

    This is what you hinted at Post 37 over at Theswamp.

    • the software to convert (CodeConvert) Lisp to C#,
      offers many other types of conversion from many languages ​​to many other languages
    • the procedure seems to be based on artificial intelligence
    • I suggest you download a large and fairly complex lisp file, translate it into C# with CodeConvert, compile it, load it into Acad, and thoroughly test the behavior of the software
    • if all goes well, we can say that codeConvert offers us a real alternative to encrypting Lisp files in Fas or Des format
    • anyway all this is interesting, but this does not mean that it is not better for ACAD and BCAD to encrypt Lisp files obtaining a non-vulnerable result

    download :

    https://www.theswamp.org/index.php?action=dlattach;topic=9042.0;attach=43221

    and do the tests I told you and then let us know

  • https://www.theswamp.org/index.php?topic=59747.45

    … the latest news !

  • an update :

    https://www.theswamp.org/index.php?topic=59747.105

  • Lisp is a very high level interpreter language. Encryption of a Lisp file does NOT change this. It still is Lisp source which will be interpreted. The encryption to DES simply encrypts the Lisp code, sometimes probably even renders it to a more effective code.

    C++, C# etc are LOWER level languages, which means that they are closer to machine language. High level languages like Lisp are closer to human language.

    C++, C# etc code must be compiled before it can be processed by a computer. Compiling means to translate the source to machine code (or today to an abstract machine code, which again can be interpreted by many different processors). Machine code ist much more secure because not many people can understand it.

  • Actually, C# interpreted by a JIT compiler, before that it’s MSIL. Which can be read with programs like ILSpy, so it’s kind of hard to protect IP in .NET modules, the only option to do this is obfuscation.

    Which is a good point! Some clever person could write an obfuscator that would essentially turn lisp modules into a black box.

    Inspiration could be taken from .NET or JavaScript obfuscator tools

    That, in combination with. DES might be pretty good.

  • It is a pity no one has picked up and redone LISP2C which existed many years ago, as the name sounds converted Lisp to C code. I have a copy but its like 16bit. With visual studio could be the way to go producing .net programs. Its way above my pay rate.

  • Open lisp FAQ talks about the ability to compile to a portable LAP file. Perhaps this coupled with DES would give better security and performance?