[Q] Windows Phone 8.1 Encrypt data - Windows Phone 8 Q&A, Help & Troubleshooting

Hello, I need to encrypt a string with a public key (or certificate) obtained from a REST service. I have these in base64 format. The question is: how can I do on Windows Phone 8.1? There's no X509Certificate, X509Certificate2 or RsaCryptoServiceProvider available..
I'm using Visual Studio 2013 Update 2..

diego.stamigni said:
Hello, I need to encrypt a string with a public key (or certificate) obtained from a REST service. I have these in base64 format. The question is: how can I do on Windows Phone 8.1? There's no X509Certificate, X509Certificate2 or RsaCryptoServiceProvider available..
I'm using Visual Studio 2013 Update 2..
Click to expand...
Click to collapse
I think you are now using non-Silverlight apps in visual studio.
Try Silverlight application

ngame said:
I think you are now using non-Silverlight apps in visual studio.
Try Silverlight application
Click to expand...
Click to collapse
Yep but I'm developing a universal library. I'll probably try Bouncy Castle (PCL) in order to do what I need.

Universal libraries are extremely crippled. Many features are unavailable for universal libs, even things that can be done (in different ways) across all the different platforms you are targeting.
BouncyCastle is a decent option though, as long as you don't need native performance.

Related

i dev unlocked my ATIV S and have ?s

ok so I dev unlocked my ativ s and was able to side load some apps that needed full unlock to work I guess but surprisingly Tube 8 worked! are there any wp8 xaps out there I can sideload or what wp 7.x xaps are out there that I can sideload at the moment?
noelito said:
ok so I dev unlocked my ativ s and was able to side load some apps that needed full unlock to work I guess but surprisingly Tube 8 worked! are there any wp8 xaps out there I can sideload or what wp 7.x xaps are out there that I can sideload at the moment?
Click to expand...
Click to collapse
Normaly you can sideload any app you build using your own wp8 sdk tools as long as the app doesn't require interop services or other higher capabilities. Sideloading store apps won'tbe possible as they are encrypted.
Which capabilities does Tube 8 uses? I don't think that you were able to install an app using the cap interopservices.
I also have waze for wp7 installed, tube 8 is an adult video service viewer if you get my drift....
Sent from my SGH-T899M using XDA Windows Phone 7 App
Waze
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_NETWORKING
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
Tube 8
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_MICROPHONE
ID_CAP_NETWORKING
ID_CAP_PHONEDIALER
ID_CAP_PUSH_NOTIFICATION
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
noelito said:
I also have waze for wp7 installed, tube 8 is an adult video service viewer if you get my drift....
Sent from my SGH-T899M using XDA Windows Phone 7 App
Click to expand...
Click to collapse
titi66200 said:
Waze
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_NETWORKING
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
Tube 8
ID_CAP_GAMERSERVICES
ID_CAP_IDENTITY_DEVICE
ID_CAP_IDENTITY_USER
ID_CAP_LOCATION
ID_CAP_MEDIALIB
ID_CAP_MICROPHONE
ID_CAP_NETWORKING
ID_CAP_PHONEDIALER
ID_CAP_PUSH_NOTIFICATION
ID_CAP_SENSORS
ID_CAP_WEBBROWSERCOMPONENT
Click to expand...
Click to collapse
@noelito I got your drift. But these two apps don't need any special capabilities to run. They can be run on each dev unlocked device. No full unlock required!
Ok so regarding marketplace apps, how can we de encrypt them so we can sideload? I have the I'll fated Microsoft YouTube xap and read somewhere to remove the wmappheadr XML something and tried that with another app and could not sideload any tips? I would like to be able to factory reset my phone and side load the app
Sent from my SGH-T899M using XDA Windows Phone 7 App
noelito said:
Ok so regarding marketplace apps, how can we de encrypt them so we can sideload? I have the I'll fated Microsoft YouTube xap and read somewhere to remove the wmappheadr XML something and tried that with another app and could not sideload any tips? I would like to be able to factory reset my phone and side load the app
Sent from my SGH-T899M using XDA Windows Phone 7 App
Click to expand...
Click to collapse
As of now, there isn't any way to decrypt XAPs. Since we are on the subject of XAP decryption, this gives way to the subject of piracy which isn't accepted .
Oh my that's not something I want to do
Sent from my SGH-T899M using XDA Windows Phone 7 App
XAP decryption *Is* also useful for reverse engineering the OEM app updates... if one of them introduces a vuln, we want to take advantage of it.
GoodDayToDie said:
XAP decryption *Is* also useful for reverse engineering the OEM app updates... if one of them introduces a vuln, we want to take advantage of it.
Click to expand...
Click to collapse
Oh I agree. I just wanted to make sure the conversation didn't float towards the way of piracy before the mod decided to shut it down.
As for deencrpyting XAP files - currently we don't know of a way to do it. Sideloading of WP7 XAPs for a long time worked after removing those headers but several months after WP7.5 (which introduced support for it) they switched over to truly encrypted XAPs and so far no one has been able to deencrypt those.
As for Interop-Services - this likely won't cause issues any more in WP8 because Native Code is now officially supported. They won't work though as other means are employed to not allow them to access functionality that is not supposed to be accessed. Most of those Apps worked through accessing certain vendor drivers/services which are likely to have changed in WP8.
@StevieBallz: ID_CAP_INTEROPSERVICES and native code have nothing particular to do with one another. Native code is a way to get out of the "API sandbox" that restricts what operations an app can request that the system do (for example, there's no official API for registry access). ID_CAP_INTEROPSERVICES is a way out of the permissions sandbox that restricts what the OS will actually allow the app to do. On WP7, there were low-privilege native-code apps that didn't use interop (DllImport project, for example) and there were high-privilege interop apps that didn't require the author to write any native code (just re-using what was already on the phone, my MultiTask Toggle app for example).
Frequently, the two were combined (WP7 Root Tools is the primary example, but every pre-Root-Tools registry editor app also qualifies). High permissions isn't very useful without native code, because the official APIs don't let you request many things which you would need high permissions to do. Native code isn't very useful without high permissions, because most of the things that you can do with low permissions can be done without native code at all. However, the two really have nothing to do with one another.
Now, on WP8, we have all the native code we could want (well, actually it takes some hacking to get out of the API sandbox again; the official third-party native code API is much more limited than the full Win32 API) but we run in an even more restrictive app sandbox. On WP7, low-privilege apps could at least read most of the registry; I doubt that's true anymore. On the other hand, ID_CAP_INTEROPSERVICES is alive and well; all the fancy, high-privilege OEM apps (like the network configuration ones, or the system diagnostic ones, or Samsung's call blocker, etc.) still use ID_CAP_INTEROPSERVICES. Looking around the Diagnosis app on the Samsung ATIV S, I've already found high-privilege provxml and file system access. Unfortunately, interop-lock is (of course) also alive and well; attempting to sideload an app that uses ID_CAP_INTEROPSERVICES still results in error 0x81030120, same as it did after Mango.
I just sideloaded the old teter hd game that was on the HTC touch hd from back in the day
Sent from my SGH-T899M using XDA Windows Phone 7 App

[Q] Lumia 520 GDR2 field test

Helo there, i was using this to constantly force HSPA on my phone because on default my Lumia 520 just keep reverting to 2G EDGE which is, as you know very, very slow. Especially in my country.
Code was ##3282# or ##3282 for some phones, but unfortunately i updated it to GDR2 hoping that it will continue to exist. This is very crucial app for a lot of WP users in "banana" republics like Serbia.
I saw there is an Native tost notification launcher. Is there any way that i could launch directly field test from it(honestly i do not know how to get free developer account or how to load apps i am newbie in WP world)?
I would be very, very grateful if anyone could show me at least a glimpse into this...
Thanks in advance and sorry for my bad english
Its still there AFAIK. The link to the thread is in my signature.
thals1992 said:
Its still there AFAIK. The link to the thread is in my signature.
Click to expand...
Click to collapse
Well that does not answer my questions. In your thread there are codes i mentined before but there is no path specified for cpu's guy tool so i can launch field test.
Those codes you posted no longer work for Lumia 520 after GDR2 update.
Greetings, Stefan
Then you need to download SysApp Pusher from the store. With that app you can check that extras+info is up to date.
EDIT: I'm just going back through the other posts.
To deploy xaps, either need to use a student email account to signup for Dreamspark or just pay $20 or whatever it in your local currency. Both of those gets you a Microsoft Developer account to develop apps and as a side effect, you can add your phone for developer access.
The second thing required is either Windows 7 x64 (If your PC shipped with 4 GB of RAM or more with Windows preinstalled, then its 64bit) or Windows 8 Pro x64 as your OS. Win8Pro is recommended, as the main os, due to Windows 7 not being officially supported for the SDK that has the deployment tool you need.
The third thing that's needed is the Windows Phone 8 SDK (Software Development Kit). It includes a Windows Phone emulator for WP7 and WP8.
The fourth requirement is kinda optional as it depends if you are planning on utilizing the WP8 emulator. The requirement is for your CPU to be SLAT compatible. This is solely due to the WP8 emulator utilizing Hyper-V on Win8.
Finally, you just sign in to the Registration app with your phone plugged in making sure the screen is unlocked first.
thals1992 said:
Then you need to download SysApp Pusher from the store. With that app you can check that extras+info is up to date.
EDIT: I'm just going back through the other posts.
To deploy xaps, either need to use a student email account to signup for Dreamspark or just pay $20 or whatever it in your local currency. Both of those gets you a Microsoft Developer account to develop apps and as a side effect, you can add your phone for developer access.
The second thing required is either Windows 7 x64 (If your PC shipped with 4 GB of RAM or more with Windows preinstalled, then its 64bit) or Windows 8 Pro x64 as your OS. Win8Pro is recommended, as the main os, due to Windows 7 not being officially supported for the SDK that has the deployment tool you need.
The third thing that's needed is the Windows Phone 8 SDK (Software Development Kit). It includes a Windows Phone emulator for WP7 and WP8.
The fourth requirement is kinda optional as it depends if you are planning on utilizing the WP8 emulator. The requirement is for your CPU to be SLAT compatible. This is solely due to the WP8 emulator utilizing Hyper-V on Win8.
Finally, you just sign in to the Registration app with your phone plugged in making sure the screen is unlocked first.
Click to expand...
Click to collapse
Thank you very much!!! I have dreamspark account but i found that i will be able to dev unlock my phone via windowsphone...
However when i launch it is just some pretemplate solution no c# or XAML coding at all... I would not like to use my MSDNAA account because it says that i only got one year to develop and honestly i just started studying IT at faculty and i do not know so much stuff about C#.
Anyways, after i eventually do that how do i launch directly field test from cpu's guy utility? Is there some adress for it?
Yes. use the string from the diagnostic thread and enter 3282 for the dial code portion.
You can get a jump start with their developing for beginners series.

[Q] Trouble with compilation in Store in Windows Phone 8

I'm presenting a problem. I have built an application that has Win32 libraries that do not belong to the subset that has in common with WinRT. From my computer I can deploy the application and working properly. But when I go to the store my application is compiled with WinRT preventing several of the features work correctly.
In turn, the problem that would be working blind because we would never know from the development environment if we are building the application works perfectly until published in up tent.
Is there any chance from the development environment that I can detect which libraries would not work once compiled into the store?
Greetings ... Jorge
What development environment are you using? Assuming it's Visual Studio, you can't use Win32 libraries on a WP app, so how are you managing to do that?
Aren't you doing test builds to the emulator?
FloatingFatMan said:
What development environment are you using? Assuming it's Visual Studio, you can't use Win32 libraries on a WP app, so how are you managing to do that?
Aren't you doing test builds to the emulator?
Click to expand...
Click to collapse
Unfortunately is neccesary to use these Win32 libraries to this app,... I'm using Visual Studio 2013 with Windows Phone 8 SDK.... so I could detect where is those assemblies... but the problem is that it is ignorance which are all native Windows assemblies that are not compiled for WinRT and there is no way for the development environment I have this problem and this means that if I am going to develop an app for X platform, that development environment should not let me use something that is not available for that platform, some of that has to exist for this problem, or at least if I let him use it when testing will have to display errors or exceptions; I can not wait for it to install the store to see if it works properly or not
Hence arise two questions I would appreciate help to find possible solution ...
1. exist this solution from the development environment to tell if it will be problems once used to give possible assemblies conflict with WinRT ???
2 There is a way to tell VS that the app you are going to do is to WinRT ??? perhaps with a more modern version ??? and with that and solve the problem from the same environment ???
Best regards and thanks repeated
I still don't get how you're doing this. When you build your app, you select the target platform, if you select ARM and have calls to Win32 API in there, it won't even compile...
How can you not know what Win32 call's you're making?
FloatingFatMan said:
I still don't get how you're doing this. When you build your app, you select the target platform, if you select ARM and have calls to Win32 API in there, it won't even compile...
How can you not know what Win32 call's you're making?
Click to expand...
Click to collapse
Unfortunatelly it compiles with ARM and run in the device too....
I know these Win32 calls of course, for example:
IsolatedStorageSettings, XDocument.Save ..... and others....
I have found the changes that I can do to resolv the problems...
But the problem is that I need to know if exists a way to detect through Visual Studio or another way wich assemblies or calls can give errors, or raise exceptions... Is a blind development for example:
I develop an app with different assemblies, into these assemblies there are 2 assemblies that can not be compatible with WinRT, when I compile with ARM there no raise errors or exceptions, but when I up to the store and when I install in my device from this store, I discover that this have these problems with the assemblies.
I'm concerned with that because is so strange...
Grettings
Also if you have a list with some assemblies of Win32 that are uncompatible with WinRT ... i will be gladded with your help
Grettings...
jhcastellanos said:
Also if you have a list with some assemblies of Win32 that are uncompatible with WinRT ... i will be gladded with your help
Grettings...
Click to expand...
Click to collapse
I suggest familiarising yourself with MSDN.
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/br205757.aspx
Have you tried just uploading your .XAP to the store? The store doesn't actually compile anything; they never see your source code.
Out of curiosity, *how* are you calling Win32 libraries that aren't part of the phone SDK? Did you use dll2lib and link them at built time? Use a hack to get the entry point of LoadLibrary and load them at runtime? Use DllImport from .NET code?
Also, not sure why you're talking about IsolatedStorageSettings. That's not a Win32 API at all; it's a Silverlight (.NET) one that is available on Silverlight for Windows Phone since the 7.0 release.

[Q] Can someone grab me the unencrypted XAP for the Microsoft Band peripheral?

I'm doing some reverse engineering for the Microsoft Band to see whether it's possible to extend/customize its behavior. I bought one, and I have managed to do some REing on the Android app with some success making minor behavior modifications. I don't have a way to get access to the unencrypted version of the WinPhone app because I don't have access to a rooted/jailbroken Windows Phone, and WP is the only platform that has support for the Band's microphone (for the Cortana integration). Does anyone have the ability to do me a big favor and get me the unencrypted XAP?
For reference, the app I'm referring to is named 'Microsoft Health' on the Windows Phone store and it is free. I would paste the link to its store page here but I guess links are disabled.
kevingadd said:
I'm doing some reverse engineering for the Microsoft Band to see whether it's possible to extend/customize its behavior. I bought one, and I have managed to do some REing on the Android app with some success making minor behavior modifications. I don't have a way to get access to the unencrypted version of the WinPhone app because I don't have access to a rooted/jailbroken Windows Phone, and WP is the only platform that has support for the Band's microphone (for the Cortana integration). Does anyone have the ability to do me a big favor and get me the unencrypted XAP?
For reference, the app I'm referring to is named 'Microsoft Health' on the Windows Phone store and it is free. I would paste the link to its store page here but I guess links are disabled.
Click to expand...
Click to collapse
Awesome. I just tried to decompile the dex file, and I found the firmware file extension was ".fwbin". I know MSFT band cannot show non latin characters. I just want to modify the firmware to support non latin characters. Could please do me a favor?

[Help] Setting up development for WP8 with Qt

I'm creating a Qt app so I thought I could publish it in the Winstore as well. But Windows is such a one big mess compared to Linux that I simply can't set it up.
I installed VS Community 2013, with the Emulator images, WinStore package management tools and the Qt SDK. I added the C:\Qt\Qt5.5.0\5.5\winphone_x86\bin to PATH, copied my program written with use of Qt Quick Controls.
I built the app with the Qt Toolchain for the WinPhone emulator. Is there any way to deploy the app directly to the emulator?
I knew no such way, so I tried generating a VS project. Even though Qt is in the PATH, qmake complains about uuidgen missing. What should I do with it?
To be honest, I'd rather deploy to the emulator directly from the Qt Creator.
It's pretty easy to deploy apps to the emulator. Just use the standard Application Deployment tool (it's installed with the WP8.x SDK, you can find it using Start search) and select which emulator configuration you want to deploy the app to, then select the .XAP or .APPX or whatever and hit Deploy. Bear in mind that the "emulator" is actually an x86 VM running on your PC; you'll need to compile any native code for x86 ("Win32" though technically that's an API used on many instruction set architectures, not an architecture itself) to use in the emulator, but to ARM (actually THUMB2) for the phone.
With all that said, I haven't heard of anybody trying to write a WP8.x app using Qt before. It might work if the compiler knows how to target the correct platform and how to bundle up the installable app and everything, but I haven't ever tried or heard about anybody else doing so.
GoodDayToDie said:
It's pretty easy to deploy apps to the emulator. Just use the standard Application Deployment tool (it's installed with the WP8.x SDK, you can find it using Start search) and select which emulator configuration you want to deploy the app to, then select the .XAP or .APPX or whatever and hit Deploy. Bear in mind that the "emulator" is actually an x86 VM running on your PC; you'll need to compile any native code for x86 ("Win32" though technically that's an API used on many instruction set architectures, not an architecture itself) to use in the emulator, but to ARM (actually THUMB2) for the phone.
With all that said, I haven't heard of anybody trying to write a WP8.x app using Qt before. It might work if the compiler knows how to target the correct platform and how to bundle up the installable app and everything, but I haven't ever tried or heard about anybody else doing so.
Click to expand...
Click to collapse
Well, it appeared to be a problem of VirtualBox. It doesn't support nested virtualization and thus Hyper-V is not detected as supported.
Yeah, that wouldn't work; the WP8 emulator uses Hyper-V and requires hardware virtualization support.
You could just get a test device; even brand new the Lumia 5xx series can be had for under $100 US. Used ones are cheaper. I think BLU and Huawei also have some very low-cost WP8 handsets.
GoodDayToDie said:
Yeah, that wouldn't work; the WP8 emulator uses Hyper-V and requires hardware virtualization support.
You could just get a test device; even brand new the Lumia 5xx series can be had for under $100 US. Used ones are cheaper. I think BLU and Huawei also have some very low-cost WP8 handsets.
Click to expand...
Click to collapse
Well, I managed to copy Flash.vhd from the Win8 fs and have it booted in VirtualBox on Linux host. The only problem is that I don't know how to copy an app to the phone machine.
The Windows Phone SDK (installed as part of recent Visual Studio versions, though I think you can still get it stand-alone) includes an "Application Deployment" tool (xapdeploy.exe). It uses USB, so you have to forward the USB device from your host to your guest VM, but after that it should work.

Categories

Resources