The Nexus 6 had a lot of fine qualities, but the sluggish storage performance was a disappointment. This was mostly due to the automatic device encryption, which was managed by software rather than hardware. In today's Reddit AMA, the Nexus team was asked about encryption support in the Nexus 5X and 6P. VP of Engineering Dave Burke responded, saying it's still software-based, but it should be even faster than hardware encryption this time.

The big difference in this year's Nexus phones is that they're running the Snapdragon 810 and 808, which are 64-bit SoCs with the ARMv8 instruction set. According to Burke, there are cryptography extensions provided by ARMv8 that offer better performance than the AES hardware encryption you could do on the Qualcomm SoC.

DB> Encryption is software accelerated. Specifically the ARMv8 as part of 64-bit support has a number of instructions that provides better performance than the AES hardware options on the SoC.

Based on this, there shouldn't be a compelling reason to go around flashing modified boot images so you can disable encryption on the new Nexus phones. They're still running on eMMC 5.0 rather than the faster UFS storage Samsung has started producing, so it's not like it's going to be screaming fast in the storage department anyway.

e.g.
1. no gambling apps on Playstore
2. encryption on by default and no way of disabling easily without use of custom kernel

CoreRooted

It's not a Google/Android approach. I believe EVERY platform that has any sort of data should be encrypted by default. We as a society have too much valuable data to not want encryption in every part of our lives. For thousands of years, we have had extremely complex keys and locks protecting our real world belongings. Why we don't have that same type of attitude when it comes to digital security is confuses me. Especially when it's even riskier now with most of our lives existing in various digital mediums.

Veneshia

lol google employee alert

CoreRooted

Who me? Because I state I want encryption enabled by default on every platform besides just Android?

Michael Hall

Why should I be forced to have extra latency on my Nexus 6 when I have no valuable data?

CoreRooted

ANY data is potentially valuable data. Do you not access your bank accounts on your phone? Check your credit card balances? Billing info for your cell account? Email accounts? Any piece of data that you might consider innocent could be a potential attack vector used to get your identity. I've seen people lose hundreds of thousands of dollars because of identity theft. Anything that can be done to make it harder for thieves to get data, then better in my opinion.

Michael Hall

I have my personal non serious Email, on which I deal with things like Discus comments and personal 'you want to go to a party?' type emails. Everything else, done on my PC, with Bitlocker and all.

I browse the internet, game and call on my phone - and I'm being slowed down by useless encryption.

mrjayviper

how is not a Google choice when they could've easily made the option enabled by default but allow users to easily turn it off in Settings => Security? My point stays the same. People in Android forums often have negative feedback on Apple's big brother approach but it's ok if it's Google.

Veneshia

LOL "keeps data private". That's cute.

Andrew Dodd

The added latency in the case of x86 AES-NI and ARMv8's AES instructions is almost nothing.

It's vastly different from Qualcomm's qcrypto engine which DID have high latency and as a result only provided acceptable performance with large block sizes, which forced qcom to rearchitecture dm-crypt to support such block sizes. (That's why Nexus devices didn't use the qcrypto engine)

blindexecutioner

Good to know it shouldn't have a noticeable impact on performance. I eagerly await benchmarks. I wonder why Apple would choose to use hardware encryption if this is better?

Good_Ole_Pinocchio

Because hardware encryption is better.

OligarchyAmbulance

So that in two years they can switch to software encryption and boast about their "wonderful new feature we invented".

makapav

When it comes to quality Apple has a much better long standing credibility. Google's is exactly the opposite. Quality is a complete afterthought.

Alexander Sofinskiy

In the future, as more and more CPUs adapt advanced encryption acceleration in their chips, I expect this performance difference between software and hardware encryption to disappear, but not the cost, granularity, flexibility...

Floss

This is not only hardware encryption, but since Apple implements the ARMv8 ISA on later phones this might be exactly what Apple has been using on later iPhones already.

warcaster

Apple is probably already using it. But before they had 64-bit, they used a dedicated crypto-processor. Apple has had hardware accelerated encryption years before Android.

Andrew Dodd

This IS hardware encryption. In fact as Floss pointed out, it's likely the exact same HW encryption (armv8 ISA instructions) as Apple in the new 64-bit CPUs.

blackice85

I was actually worried about the sluggishness I heard about before getting the Nexus 6, but honestly it still feels snappy for me, at least for what I'm using it for. Loading games and other apps, even big HD videos is as quick as on my desktop, that's running off a SSD.

Floss

Oh common. Including hardware crypto as part of the ISA instead of as a optional hardware block does not make it software crypto. It is still 100% hardware cryto, it is just a mandatory part of the ISA now. Doing the math manually is software. Doing it as a single instruction to a hardware block is hardware.

Clubber

This. I was thinking the same thing because it's using hardware accelerated crypto op codes.

It literally is hardware based. Glad someone else thought the same thing.

TheManii

I didn't read into it that far, but it might be better to say it's now accelerated by features on the cpu, instead of simply using a dedicated accelerator.

Its sorta like how x86 now includes AES and SHA1 as native cpu instructions, intel core iX cpus with it enabled are an order of magnitude faster then purely software for those specific steps, and within the ballpark of dedicated AES accelerators, though AES is only a single (large) part of encrypting/encryption.

Having dedicated accelerators on pcs is generally frowned upon since they're really inflexible (ie new standard/revision and your accelerator is now useless) since they can simply do it in purely software, but obviously theres the heat/power usage that mobile devices cant afford.

Clubber

Well said. This is the analogy I used when explaining it to a friend a couple weeks ago.

The x86 comparison is a great one. And every review I have ever seen of it's AES instructions calls them hardware accelerated. Same thing with QuickSync. I've never seen someone try to make a difference between CPU vs non-CPU hardware acceleration before.

TheManii

I remember h264 decoder cards being a thing for atom netbooks, atoms back then couldn't usefully decode 1080p x h264 videos/streams, and they needed a dedicated card to do so.
(Not encoding, but merely being able to watch 720p+ smoothly/at all)

It can get really pedantic in the x86/pc world since you can use the GPU shaders to work too, ultimately:
(Most "efficient", least flexable from top to bottom)

Though at least with h264, there are purely software encoders that are optimized to the point that they can boast they're as fast as hardware (ie #4 as fast as #2), the same could be possible with encryption.

Goog could hypothetically get/create a software only implementation that is so fast, they stop using ARMv8's acceleration, however unlikely this would actually happen. You can't really optimize hardware after the fact for existing devices.

warcaster

Yes, that's what it means, but it's still strange to call it "software encryption". He could've easily made the distinction that it "doesn't require a DEDICATED hardware "accelerator" anymore".

TedPhillips

yes this. armv8 acceleration is still hardware, in the cpu block, rather than hardware in an adjacent (proprietary) in-soc block.

either is better than a software implementation, armv8 obviates the need for the proprietary block, and is more widely consumable. (any apps compiled for armv8 can leverage the instructions rather than those that just can only reference the system methods to leverage the 'other' acceleration)

Simon Belmont

I know I asked someone this before... And I think they said it would work either way, but does it matter if the OS on top of an ARMv8 chip is 32-bit to leverage these accelerated crypto commands?

For example some devices have a 64 bit chip, but use a 32 bit version of Lollipop (Moto G for example). Would it benefit from the commands?

TedPhillips

dunno/depends.

Andrew Dodd

Also, the ARMv8 instructions (which are probably closely related to AES-NI on x86) are going to have MUCH lower latency than an "external" (even on-chip, it's still "external" as far as the CPU goes) engine.

The reason AOSP wasn't supporting the Qcom crypto engine was because AOSP's crypto operated on single 512-byte blocks - the setup/teardown latency of the Qcom crypto engine was high enough that it only gave acceptable performance when fed MUCH larger blocks of contiiguous data.

warcaster

Exactly what made his comment so confusing. Being part of the ISA means it's hardware accelerated encryption, not software.

siveZ

I'll probably disable it as soon as I get my hands on the device, anyway.

The reality is they prolly already posted it on facebook anyway, all they have to do is like it ;)

Matt

How many cell phones have you had confiscated by the NSA?

ReOS

I know that everyone likes to joke/freak out about the NSA, but they're not the sole ones that could be coming for your data.

DuckingGold

Oh ffs, then go live in the woods with two cans and a piece of string if you're that paranoid.

Donatom3

They're are so many reasons to keep your data on your phone encrypted. Many people keep their life on them. Meaning if anyone gets a hold of a cell phone and it isn't encrypted they have access to their email, possibly Bank Accounts, friends and family contact info, and enough personal data to open up credit lines. That's just one example.

John Samuel αΩ

Why would the NSA take your phone when they can just take all the data from it without you knowing?

Veneshia

700 dollar phone that runs like a 200 dollar phone

Badouken

Some phones allowed this, the Nexus 6 however does not. Not sure about the new Nexus devices but they will probably be the same as the 6.

Mr.Foobar

I don't know if there's a reason to disable encryption on things anymore. I know that it caused a performance decrease on previous generation phones, but if the Nexus 6P, 5X are running smoothly with encryption, there's no real reason to AFAIK.

DT

No, it caused a performance decrease on previous versions of the software on one previous generation device.

Felipe

Another important note from the AMA:

Michelle Harrod

as Jimmy said I am dazzled that a single mom can get paid $28273 in four weeks on the internet ........Easy online work for all. Make $5000 to $9000 per week online.4-5hour daily work.........read the full info here
.wok......➤➤➤ http://GoogleTopCareersGetSuperbFinancialJobs/get/morethan$97/h...✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥✥

Erstam

Does this mean it's still going to be a pita to flash roms/recoveries? Or sure was on my nexus 9

Suicide_Note

I hope not, because it was business as usual on the N6.

Daggett Beaver

LOL - even Google is making with the sour grapes.

blackice85

It is for me. I'm honestly curious where they think it is sluggish, aside from comparing its benchmark numbers to a non-encrypted device.

DT

The original, day-one, 5.0 release had a pretty terrible implementation that was MASSIVELY cleaned up at the first update. Tech journalists never remember these updates, though, and will stick with their dogma forever.

blackice85

Ah that so? I figured something was amiss, as mine really does run smoothly 99% of the time, and anything that requires accessing a lot of storage (like a large video) was always quick.

DT

Even then it wasn't a giant problem, and unless you were doing actual storage operations you'd just notice a second or two hiccup a few times a day when using it.

blackice85

So it was just overblown then? I didn't get the Nexus 6 until like January, so that update might have already been in place.

DT

I believe it was? Regardless, the encryption is great and anyone complaining about it is dumb.

AND I also wish Google worked better with Qualcomm on the N6 because it could be even better with that hardware support. I just don't think it's a big enough deal to go and deactivate it (even if it were an easy thing to do, which it is not).

Veneshia

You dumb barbarian. My Nexus 6 is slower than my Nexus 5. The encryption turned it into garbage.

DT

You're either a liar or too stupid to know that some app you installed on your N6 is causing the slowdown.

Veneshia

Why would I be lying? lol Same apps on my nexus 5 you dumb ass. Nexus 5 does circles around the nexus 6. Go home, you're drunk.

DT

I don't know why you'd lie, which is why I gave you the stupid out.
Your cadence and word choice is much closer to that of a drunk person, as is your insane position that the N5 can come even close to the N6.

Veneshia

go do some cursory research on the speed between the 2 and forced encryption. please stop talking to me.

Daggett Beaver

You guys seriously need to crank out Nexus articles faster. I counted 5 whole articles on the home page that aren't about Nexus. Three of them aren't even about Google!! For shame.

Renaldi I.

SamMobile is over there -> sammobile.Com

I have a feeling that'd you'd feel more comfortable over there.

Roberto Virga

Hey AP, since you're reporting from the AMA, how about reporting this tidbit too: the new Nexuses have USB 2.0 and not 3.1, exactly like the OnePlus 2. How would you like to eat that crow, grilled or deep-fried?

Daggett Beaver

They're saving that issue for a separate article. They haven't met their 20-article quota of Nexus articles today yet.

RyanWhitwam

We don't control the news cycle.

Simon Belmont

No one is forcing you to read them. Or COMMENT in them.

You could use RSS and filter them out even. Bye bye.

Carl

That's not what I heard being reported. Claims are it can support 3.1 speeds.

It wasn't about choice, either way. I had no choice to enable writing to my microSD card when Google shipped -- I forget -- 4.2? 4.4? The only option was to root. Now Google changes Android to allow microSD card writing again... and then doesn't include a microSD slot in the Nexus.

Android Developer

Not only that, but the new API for the SD card is so problematic that so few apps have adopted it.
Here are some problems that I've found when updating my app to support it :
1. can't really use real paths of files.
2. can't just ask the user "do you allow the app to access the SD-card".
3. can't move files. Instead, you copy and then delete them, which is both inefficient and wasteful (takes double space)
4. can't use any third party library that worked before with the previous API.
5. I can actually read from the SD-card, but need the user to grant me the ability to write to it... Isn't it weird in terms of privacy ? Only thing that it helps is that apps won't be able to fill the SD-card with junk files without having the user agreeing on this...

Sadly, no custom rom (not even stock-based rom) out there has the official support of this new API, so I had to use official Stock rom to try out this API. :(

Leandro Brandão

does it make device slower?

Kyle Gospodnetich

Do other Snapdragon 808/810 phones have this improvement for encryption? Is this present in Lollipop, or new with Marshmallow?

Simon Belmont

It should work in Lollipop, too, I believe. It's just that the N6 didn't have a 64-bit ARMv8 chip.

I'm not 100% sure if the N9 used it. It's chip was 64-bit ARMv8.

compuguy1088

I don't think storage and/or encryption was one of the issues with the nexus 9....

DT

It wasn't with the Nexus 6 either.

Simon Belmont

It wasn't. The storage speeds benchmarked really well actually, leading me to further believe that the accelerated crypto instructions in ARMv8 helped it immensely.

Of course it had/has plenty of other issues. Lol, but I won't digress.

Andrew Dodd

All 808/810 phones have ARMv8 instructions.

DT

There wasn't a compelling one for the Nexus 6 after the 5.0.1 update.

Zdenka Micka

Software encryption means the phone will lag after a month or so. Better to use a dedicated hardware chip to encrypt data like Apple iPhones do.

Andrew Dodd

It's not software encryption, the headline is complete misleading BS.

ARMv8 AES instructions ARE hardware encryption.

steelew

I really hope nexus root tool kit works with this. I'm just waiting to hear a little more about it (usability) before I drop $650 on it and sell my G4.

ToyotaBedZRock

Well special instructions are like hardware acceleration, same as the special Intel instructions.

Veneshia

GOOGLE PLEASE REMOVE FORCED ENCRYPTION FROM THE NEXUS 6!

dw

It might be same or even faster than hw decryption but it sounds like CPU will be busy in decrypting data from storage, which may drag down other tasks that CPU runs at the same time. Having h/w engine also means things can be done in parallel, which will ease CPU's burden.

RENLIKEDINDIN

The best security measures these days is. Basically to not store sensitive secret data and files on your mobile devices. Banking apps and other conveniences we love is really not convenience. Just caution more caution.
And Mobile consumers should not be dictated to and forced to encrypt if they don't wish to. Freedom is having your own choice.