Modular Multiplicative Inverse

A very useful post … helps me very much writing key splitter in c++ .. reference code is taking from's_Secret_Sharing


The modular multiplicative inverse of an integer a modulo m is an integer x such that $latex a^{-1} equiv x pmod{m}.$

That is, it is the multiplicative inverse in the ring of integers modulo m. This is equivalent to $latex ax equiv aa^{-1} equiv 1 pmod{m}.$

The multiplicative inverse of a modulo m exists if and only if a and m are coprime (i.e., if gcd(a, m) = 1).

Let’s see various ways to calculate Modular Multiplicative Inverse:

1. Brute Force
We can calculate the inverse using a brute force approach where we multiply a with all possible values x and find a x such that $latex ax equiv 1 pmod{m}.$ Here’s a sample C++ code:

The time complexity of the above codes is O(m).

2. Using Extended Euclidean Algorithm
We have to find a number x such that a·x = 1 (mod m). This can be written as well…

View original post 985 more words


Tips and Tricks about creating an effective presentation

While reading through online blogs i’ve found out some useful articles related to graphical presentation styles by Scott Schwertly. First article named The 4 Basic Principles of Presentation describes Balance, Emphasis, Unity and movement among objects as key factors to attain viewer’s attention. Whereas, the second article on How to utilize the Gestalt principle explains about The Gestalt Principles designed and developed by The Berlin School.

Trying to install and configure OpenSSL  from last two days. Finally, i did it 😀

My Specs were:

> Windows 8.1 (64 bit)

> Visual studio 2010 64 bit command prompt

> OpenSSL (v 1.0.1g)

> ActivePerl (v 5.16.3)

BTW, a very simple and useful procedure is described here and here

P.S : make sure not to include any spaces in your directory names (i-e always create “OpenSSL-bin” instead of “OpenSSL bin”)

Twinkle twinkle little star, how I wonder which NoSQL database is suitable so far?

My recent article on YCSB …

Applied Information Security (AIS) Lab's Blog

NoSQL databases have no longer become an unknown database paradigm, since it has been almost a decade or two after its introduction in the market. Some of the most popular NoSQL databases include MongoDB, CouchDB, Voldemort, Cassandra etc. The use of these databases in the industry, mainly due to their elastic nature and simplified application development, is spreading like a viral disease these days. Everyone tries to use them in their applications, most probably because of their open source nature. But the question arises “Is every NoSQL databases fit for every kind of purpose?” Well, certainly not, partially because all of these databases have different features and schema definitions and partially because there is no single proper way to compare performance of these databases. “So how someone can compare what kind of NoSQL is suitable for their workload?” This is definitely a question to ponder upon.


View original post 345 more words