Instructions for using Rabin Information Dispersal Algorithm (IDA) - cryptography

I want to work on Rabin Information Dispersal Algorithm (IDA) using Crypto++ in Linux.
A simple instruction can help me.

I want to work on Rabin IDA by using crypto++ in linux, A simple instruction can help me.
At this time, there is no consolidated treatment of the secret sharing schemes.
Your best reference at the moment is in the Crypto++ test program cryptest.exe. Take a look at the test.cpp and the functions SecretShareFile/SecretRecoverFile and InformationDisperseFile/InformationRecoverFile.
The platform - Linux vs Windows vs OS X vs BSD vs .... does not matter. It works the same on all platforms.

Related

How can i Lifting x86_64 assembly code to LLVM-IR?

I'm researching of virus and I'm faced with the task of deobfuscating its virtual machine. I chose to do this through LLVM and I had a question, where can I see a simple example of lifting instructions to the LLVM-IR level? For example, where can I look at code that just translate one pop rsp instruction to LLVM-IR? Since I didn't find anything like that.
Maybe someone has articles where this is described or can someone suggest with an example?
Here is a list of similar tools you could try:
MeSema relies on IDA Pro to disassemble a binary file and produce a control flow graph. Then it can convert the control flow graph into LLVM IR.
llvm-mctoll is easy to use, but SIMD instructions such as SSE, AVX, and Neon cannot be raised.
retdec is a retargetable machine-code decompiler
reopt is a general purpose decompilation and recompilation tool, support x86-64 Linux programs.

Win8 and Cilk++

I was willing to create an app for IntelAppUp store.I came across Cilk++.I was wondering how to use this C++ library in C # application while building a form based application?Any insight will be helpful
Cilk++ is unsupported. It has been replaced by Intel® Cilk™ Plus, which has been implemented by the Intel Composer XE C++ compiler (Composer XE 2011 or later), as well as in the "cilkplus" branch of GCC.
You'll need to be careful mixing Cilk Plus and C# forms. Cilk Plus provides an easy-to-use fork/join parallelism mechanism. Inside the parallel region, there's no way to predict which thread a piece of code will run on. You'll need to be aware of the limitations of C# forms and threaded applications. A good primer on the issues here is the article "Safe, Simple Multithreading in Windows Forms" available at http://msdn.microsoft.com/en-us/library/ms951089.aspx . You might also look at the QuickDemo example which shipped with Composer XE for Windows. Admittedly, QuickDemo is an MFC, not WinForms, based application, but it demonstrates many of the same issues.
- Barry Tannenbaum
Intel Cilk Plus Runtime Development

Compiling Objective-C app for Linux (API coverage)

I might be asking something strange here, but I'm unsure where to begin. The thing is that I am considering writing a command line tool on a Mac using Obj-C and the Foundation classes.
But there is a very big risk that I would like to be able to compile it for different Linux distributions to run as a server app in the future.
I understand that it is not a problem in itself to compile Objective-C for Linux, but what I don't understand is the API coverage.
As I have understood it so far I can use GNUStep to compile for linux, but is there a good way for me to get an overview of the API coverage? What I mean is, if I use a class that has been added to the Foundation framework in OSX Lion lets say, how big is the risk of that not being available in GNUStep at that time?
I hope I am asking a question that you guys can understand, basically I want to avoid writing an app that can theoretically be compiled for linux, but not in practice because of missing classes etc.
Thanks!
An opinion: The risk is fairly high. GNU Step is an open source project and dependant on its volunteers to keep it up to date. OS X Lion has a small number of additions to Foundation and AppKit.
Your best option if you want it for *nix in the future will be to write it in generic C/C++ and then thinly wrap it in an NSTask if you want a GUI.
You should be able to check if the API's you're using are available by consulting the GNUStep base API docs.
You may want to target GNUStep as your base if compatibillity is a big concern. Compiling for mac should then be rather trivial, compared to moving the code the other way. Of course you always have the option of helping inplement whatever is missing from GNUStep too.

Is it possible to embed LLVM Interpreter in my software and does it make sense?

Suppose I have a software and I want to make cross-plataform plugins. You compile the plugin for a virtual machine, and any platform running my software would be able to run this code.
I am wondering if it is possible to use LLVM interpreter and bytecode for this purpose. Also, I am wondering if does make sense using LLVM for this purpose instead of something else, i.e. is it what LLVM was made for?
I'm not sure that LLVM was designed for it. However, I doubt there is anything that hasn't been done using LLVM1
Other virtual-machines based script engines are specifically created for the job:
LUA is very popular
Wikipedia lists some other Extension/embeddable languages under the Scripting language entry
If you're looking for embeddable virtual machines:
IKVM supports embedding JVM and CLR in a bridged mode (interoperable)
Parrot supports embedding (and includes a Python interpreter; mind you, you can just run python bytecode images)
Perl has similar architecture and supports embedding
Javascript supports embedding (not sure about the architecture of v8, but I guess it would use a virtual machine)
Mono's CLR engine supports embedding: http://www.mono-project.com/Embedding_Mono
1 including compiling c++ information to javascript to run in your browser...
There is VMIR (https://github.com/andoma/vmir) which is a LLVM bitcode interpreter / JIT engine that's intended to be embedded into other apps.
Disclaimer: I'm the author of it and it's still work-in-progress but works reasonable well.
In theory, there exist a limited subset of LLVM IR which can be portable across various platforms. You shall not specify alignments, you shall not bitcast pointers to integral types, you must avoid intrinsics, etc. Which means - you can't immediately use a code generated by a stock C compiler (llvm-gcc, Clang, whatever), unless you specify a limited target for it and implement sanitising LLVM passes. Another issue is that the bitcode format from different LLVM versions is not guaranteed to be compatible.
In practice, I would not go there. Mono is a reasonably small, embeddable, fast VM, and all the .NET stack of tools is available for it. VM itself is pretty low-level (as long as you do not care about the verifyability).
LLVM includes an interpreter, so if you can build this interpreter for your target platforms, you can then evaluate LLVM bitcode on the fly.
It's apparently not so fast though.
In their classic discussion (that you do not want to miss if you're a fan of open source, LLVM, compilers) about LLVM vs libJIT, that has happened long before LLVM became famous and established, the author of libJIT Rhys Weatherley raised this particular issue, he stated that LLVM is not suitable to be embedded, while Chris Lattner, the author of LLVM stated that otherwise, it is modular and you can use it in any possible fashion including embedding only the parts you need.

Atmel C compiler manual?

I'm just getting started with the Attiny84 on AVR Studio 5 (based off of Visual Studio). However, I cant find the C programmers manual for it so I can figure out how to write ISR's, address GPIO pins, etc... Any ideas where I could find the manual for it?
Just looking at the AVR Studio 5 web page, it looks as though it can use the GCC compiler--not sure what other compilers it might be able to use.
The GCC compiler is an open-source compiler used for many platforms, so documentation is available for that from many places on the Internet.
The other thing I could suggest is taking a different approach: start by looking at some publicly available code for the AVR. AVR Studio 5 is in beta, but I expect it wouldn't be hugely different from what has already been in use for several years (AVR Studio 4 etc). AVR Freaks is a good resource for looking at AVR code done by others, for a wide range of applications.
It takes a bit of hunting down, but according to this press release, the integrated compiler is GCC. The GCC documentation is at http://gcc.gnu.org/onlinedocs/ for all versions.
In the 4.6.0 release, AVR specific sections are:
3.17.2 AVR Options
6.37.8 AVR Variable Attributes
The Atmel AVR Studio 5 web page claims that it has several hundred example projects included, I am sure than many of them include interrupt handler examples.
So the official manual is located here (provided by Atmel Applications Engineer):
http://www.nongnu.org/avr-libc/user-manual/modules.html
It had all the information I needed to get up and running.
I too am just getting started with AVR Studio 5. When doing GPIO, interrupts etc, I think you will want to leverage the code already provided in the ASF (Atmel Software Framework). Under the Project menu use the "Select Drivers from ASF..." to select the pieces you need. Alternately you can load sample projects targeted for your processor. I found the AVR Studio screencasts on the Atmel site (they are also on YouTube) worth watching.