Profile cover photo
Profile photo
Pece Milosev
Pece's posts

Post has shared content
Android Support Library 22.1 - ActionBarActivity is dead, long live AppCompatActivity
You’d be surprised how much we can pack into a 0.1 update to the Android Support Library: revision 22.1 includes improvements to Support V4, AppCompat, Leanback, RecyclerView, Palette, and Renderscript.

Support V4 adds drawable tinting to all API4+ devices, the new ColorUtils class makes working with colors easier, and new interpolators have been added to make great animations.

AppCompat gets a remake as we deprecate ActionBarActivity for the new AppCompatActivity, now built on a AppCompatDelegate that can be used to add AppCompat functionality to any Activity. There’s also a new AppCompatDialog, support version of AlertDialog, improvements to widget tinting, and expanded android:theme support.

Leanback now includes a guided step functionality, making it easy to build a multiple step process that looks great on Android TV.

RecyclerView seeks to make life easier with a new SortedList data structure, making it easy to tie a changing set of data to a RecyclerView.Adapter.

Palette is now 6-8 times faster and has a new Builder pattern for constructing Palette instances.

Renderscript improved reliability and performance and adds additional script intrinsic operations, bringing new pre-defined operations to all API 8+ devices.

Check out everything that has been added in this release and download the updated Android Support Library via the Android SDK Manager.

#AndroidDev   #AppCompat   #SupportLibrary   #Leanback  

Post has shared content

Post has shared content
Do you believe in free education as much as we do? Then contribute to our Kickstarter campaign! Cybrary is free, but building this community costs us a lot of money. We want to continue to provide our users with awesome resources, but we need your help to do it! With your donation, you help us can expand our course offerings, develop a mobile app, support captions/transcriptions for video, and many more! Plus, when you donate, you’ll get a really cool thank-you gift from us! ‪#‎supportherevolution‬

Post has shared content
Writing high-quality Java web app in seconds/minutes/hours with Rapidoid!

Post has shared content
Zatoa ja si go ostavam telefonot prazen po nekolku dena :)

Post has shared content
Get 2GB of free #Google Drive storage by checking your internet #security settings.

Read more:
Animated Photo

Post has shared content
Writing high-quality Java web app in seconds/minutes/hours with Rapidoid!

Post has attachment
Svetlana Stojanoska was tagged in Pece Milosev's album.

Post has shared content

Post has shared content
The philosophy behind the 'secure' SSL connection or The Postman Always Rings Twice

Maybe you have asked yourself, how a 'secure, encrypted connection' to your bank could be built up, when no passwords or keys were exchanged before?

Imagine a travel suitcase with two locks. Now you have a postman, who transports this from you (point A) to somebody else (point B). And you don't want the postman have a look into your box. How can you do that without having to hand over the keys? Letting the postman transporting box and keys at the same time won't do!??

The solution:

You begin with locking your box with a single lock. The 'private key' to this lock you put into your pocket.
Now, you're handing over the box to the postman. He carries the locked box to point B.

The other person, the receiver, now locks the box with a second lock, also keeping his 'private key' in his pocket.
Now, the postman carries the box back to A, knocking on your door the second time. In his hands: The same box - double locked.

Now you remove your lock with your 'private key', putting lock and key into your pocket.

The postman now carries this box, just again 'single locked', but still locked, content invisible, inaccessible for the postman, back to B.

The postman knocking the second time on B's door, bringing the box, which indeed, still is locked - but no problem - B can open the box, since it's his own lock, he posesses the key for!

So lets summarize: The box was locked all the time, it was transported. The postman so had no chance to have a look into. Surprisingly, no key had to be transported.

You (A) and the receiver (B), often called "Alice" and "Bert" in cryptographic papers, never had to hand over the keys to the postman. You had them - all the time - in your own pocket.

Isn't that just amazing?? Just by transporting the double lock box two times back-and-forth, the need to reveal the key (handing over a key to the postman) simply becomes - void.

This is the core idea behind any 'public key' mechanism!

Imagine, US patent office would allow to patent such simple mechanisms, forcing the world to pay billions of $$$ license fees!!!

Now to the mechanism, how to emulate this suitcase with two locks.

From math you might know, that factoring a product of two primes, it's 'decomposition' takes long. Testing a long random number for being prime, is easy, see Wikipedia. So you easily might generate long primes and multiply them, without another person giving a chance to split them up again.

How can Alice and Bert now use this for emulating a suitcase with two locks?

Alice constructs a long prime (p) and a second long one (q). Alice now sends the product of these two primes to Bert:

A -> (p*q) -> B

Bert also constructs two long primes (v) and (w) and multiplies them (v*w). Bert, having received (p*q), so multiplies (p*q) with v and w, sends this back to Alice:

B -> (p*q*v*w) -> A

Alice now removes p (the first prime) by dividing the product (p*q*v*w) by p and sends it back to Bert:

A -> (q*v*w) -> B

Bert, of course knowing v and w, can divide (q*v*w) by v and w and now has - q!!!

q is the 'secret' prime now, with which Alice and Bert can encrypt their whole (SSL/SSH/...) traffic!!

Lets see, what 'the postman' saw:

The product of (p and q). No chance for him to reconstruct either p or q. The product (p,q,v,w) -> no chance to reconstruct v or w. The product (q,v,w) -> still no chance to reconstruct q.

The core idea behind is a simple regrouping of just 4 primes:

(p x q) x (v x w) becomes regrouped to p x (q x v) x w.

That's all you can know about SSL and 'asymetric key encryption':

Just two simple core ideas from 7th class math: A suitcase with two locks and a regrouping of four primes!

Happy christmas!

"What can not be combined on a single manuscript page, is not been thought through yet ready for decision!" (Dwight David Eisenhower)

Wait while more posts are being loaded