Desktop Application Video Encryption - java

I have few questions regarding development of desktop application and I can only access internet for first login where user will authenticate himself. I have an idea that I'll bring in the key used to encrypt videos from online server and save it to local db so key isn't in the code for anyone to inspect.
Is it a good method? As app will be running offline and I don't want anyone to access my videos.
I will have to decrypt one video and play it unless there is some method that decrypt and play on the fly like libmedia does it in android. I have no preference whether I have to develop it in Java or C#. Which language provides better obfuscation keeping in mind that I only need it for windows OS.
Thank you

It sounds like your are trying to develop a sort of light weight DRM solution - unfortunately, this is going to probably be lightweight in the protection it offers also.
For example, if you store the key in the DB it will still be relatively easy for someone to get to it using a regular DB viewing tool.
DRM is not really about making it impossible to copy content - more about making it hard enough to do that it is 'not worth it'.
Depending on how 'secret' or valuable your videos are your approach may be fine - i.e. you may make it enough work to find the key etc that uses won't bother. If your videos were regular studio produced content then they would probably not be happy with this level of protection.
If you do need stronger protection then regular DRM from MS, Adobe and Google etc is available through many of the standard video hosting providers (Brightcove, Ooyla, Kaltura etc) and the DRM they use will support offline playback, which I think is the requirement you have.
They will also all allow decryption and playback 'on the fly' - i.e. you don't have to decrypt the whole video before you play it back (in fact they would typically not do the whole video decryption first anyway as you would then have the whole content in clear stream making it easier to copy).

Related

PlayReady DRM on Wowza with custom streaming app

I have build a custom app(Android platform) that live streams my mic and camera to a wowza server. I want to extend the Microsoft PlayReady SDK (for securing the content),but I am a little bit confused about how to do it.
Far as I read here (see link below),I only need to follow the steps indicated there,and that is it. Or this tutorial works only with GoCoder?
http://www.wowza.com/forums/content....28PlayReady%29
After I read the PlayReady documentation,I found out that I also need to implement some code in my app(but it doesn't mention for which server I stream,or something else.Just how to implement their SDK). My app functionality is similar to GoCoders. It streams the media using an rtsp connection,and the video is a H.264 format.
My question is what is the proper way to implement the PlayReady SDK and make it work with my app and the wowza servers (I mean crypting/securing my videos)?
Thank you,
Bob
P.S. My app is not public yet.
Bob - DRM can be pretty complex and in most cases suited best suited for high value content, if you want to do that route there is some lifting to do.
The article you noted above tells you how to set up the BuyDRM PlayReady module on Wowza Streaming Engine (with any incoming source, not just GoCoder). Once you have enabled PlayReady on the Wowza server, you will not need to do anything more in the app as far as encoding goes, the encryption is all done on the server. What you will need however is a custom player that can play back this encrypted stream, as well as a PlayReady key server to manage access.
You may want to consider a somewhat lighter solution, like secure token and streamlock which is focused more on preventing unauthorized playback and transport encryption rather than content encryption.

How to monitor the highlighted text(or selected text) from other opened APPs in Android

In Java we can get the highlighted text from native window by using JNA or JNI. For example we could use
Monitor text that is highlighted
Is there any way to do the same thing by using Android SDK??
You are welcome to use the accessibility APIs to write an accessibility service and watch for text selection events. This will require the user to agree to allow your app to spy on all user input, which will tend to make your app less popular.
Otherwise, this is not possible, for obvious privacy and security reasons.
Using purely the SDK without exploiting a security vulnerability is not possible.
There is a simple explanation of why this is not possible.
The first reason is the way Android apps are executed in the OS in a sandboxed way using linux's user groups and permission system.
Every running process and Application on Android has it's own user and group and permissions to access those resources only. So in a way they cannot communicate with other apps(or capture what a user is highlithing at the moment.
The only way for an app to communicate with other is using the binder IPC, which has to pass through the activity manager first. As far as my knowledge goes, there is not a defined way to do this. Notice this is a layer of protections inherited from linux below Android's usual permission system.
Adding to this, starting from Android 5(lollipop) add to this layer the now enforced selinux policies, which do not allow the application domain to access other domains that handle graphics, the mediaserver, and some others, I will not enter more in this topic due to it's complexity and relevance to the question, just know that these are some very secure mechanisms that prevent actions that might imply a security breach.
Is it possible? Yes, however it involes exploiting a vulnerability, but this is another topic and for that I should recommend to search papers on the web that talk about vulnerabilities in android.

Java ME on Siemens CX70

I have very old Siemens CX70 in working state and just don't want to throw it out. My idea is to use its math power and peripherals (GSM module, USB, Camera and screen) to build some simple applications for home use (multichannel termometer, timer and cheap security system - for examples).
I know I should use Java ME and IDE (I love Netbeans, for example). Can you tell me what I need more to start developing? I know Java well, I just need to make an environment to developing, debug and deploy. Mobile library documentation will be very helpful too.
Thanks.
There are so many online tutorials about this topic that the only right thing to do is to refer you to google.com
Search after "getting started with j2me".
However, there's something else you should know upfront before getting too excited.
The security model in JavaME will prevent you from doing much useful stuff, in relation to some of the things you mention.
Every time you try to access certain things in the phone, like e.g. the camera, or send SMS, or read/write a file on SD card, etc etc - the phone will show a popup "This app is trying to access camera. Allow this?". And the app will only continue after a manual click on Yes.
As you can imagine, this of course renders a lot of ideas useless.
In order to prevent these popups, you can sign your app with a certificate you buy from Thawte or Verisign. But as that'll cost you $300 a year, it's not the way most sparetime hobby developers chooses.
Personally, I found another way, but it requires you to use a phone from Sony Ericsson.
Because the old Sony Ericsson phones can be patched in order to remove the Java security. After doing this on one of my old phones, I've been having fun making apps like the ones you mention. For example, an app that keeps an eye on my home when we're out, by taking a picture every second. If it detects a difference in the picture, it sends me an MMS with the picture. :-)
I have searched a long time for patching options for other brands, but I just can't find anything useful. Nokia should supposedly also be patchable, but I just can't find anything useful about it.
So in short: If you'd like to make some sparetime hobby apps on a phone like that, you should either find a Sony Ericsson phone and patch it - or go dig up an old used Android device.
Good luck.

How easy/difficult it is to create app to send text field to sql for Android?

I have basic knowledge of Java but have never developed for Android.
A friend asked me for an app that seems easy enough to develop but I would need some help for Android.
All the app needs to do is send a text field (for example license plate number) to a predetermined SQL Server database.
Is this easy in Android as it sounds?
Thanks in advance. Cheers.
Darko.
That should be easy, but does it need to be a full-blown Android application for that?
Sounds like a simple webpage with an input-field and a submit button would do the job as well.
If you're familiar with using databases from Java the task is very simple. Just write the code that sends a string to a database. The exact same code you would use on a desktop Java application will do.
The rest is a matter of defining your user interface and obtaining the string. There is a good basic tutorial you can use on the Android developers web site: http://developer.android.com/guide/tutorials/notepad/index.html.
The number of code lines in the whole application will be in the range of a couple of dozens.
It sounds like you want the license plate information stored in a separate server, but if you also wanted to store some information on the device itself there is a simple Notepad tutorial provided by the Android Developers site that explains how to setup and utilize an SQLite database on the device. This by no means would replace the functionality of a server, but is another Android feature that is at your disposal.

Video training program

I am looking to create a video training program which records videos - via webcam, user screen capture and captures sound. Now the main problem is that I need a cross-platform (mac and windows) solutions.
I know its possible to use flash to record webcam + audio. But its not possible to record the user's screen via flash.
So am wonder if I should use Java (which i believe will work on mac & windows). I do not want to develop to separate versions because of the cost involved in developing two versions.
Please guide me as I am new to this.
Thank you.
UPDATE
Hello again,
I had a look at the following site: www.screencast-o-matic.com or www.screentoaster.com. I see that they have developed a java applet which helps interact with Windows/Mac to record the screen.
I am wondering how to go about developing something like that and integrating it with Flash (for webcam and audio recording).
Is this a better idea?
This is not an answer to your question, but I strongly recommend against using video for educational programmes. Our company delivers university courses on-line, and we long ago learned that video feeds are only effective under particular scenarios. In general, a talking head is a waste of bandwidth. You're much better off to put together a well designed powerpoint presentation, record a voice-over (and edit it!) and then assemble the whole thing as a flash presentation. This is a non-trivial amount of work, but it provides a much more interesting product for the student.
When to use video:
1) When you are demonstrating something dynamic - Mechanics or Chemistry for example.
2) When you are acting out a scenario or case as an illustration -- For example, threat de-escalation techniques for high school teachers.
When you solve the screen recording problem, seriously consider whether you need full motion or if you can get away with stills. Often the motion is distracting, and a still with good voice over can be more effective. (Hint: Replace mouse pointers with something HUGE before recording -- Like Fox did with hockey pucks)
Try CamStudio. I don't know, if it works on Mac, but on windows, it's the best solution I know. It's open source, so you can use it's source code, if you want to :)
If you're looking to build an application that does all of the recording and screen capture itself, then you might consider using Adobe AIR (essentially, Flash running on the desktop) in combination with Merapi. Merapi is essentially a bridge between Adobe AIR and Java. So for example, for your project, you might use Java to handle the lower-level (but still cross-platform) stuff you can't do natively in AIR, and use Merapi to wire the Java application to your AIR UI.
This is by no means a simple project. Lets get that said and out the way. There are open source (and cross-platform) options for each element, but nothing (I know of) that will do everything for you.
I think the "cleanest" option would be to use Flash for webcam and audio, as you said, and run a VNC server to send the screen video... The only closed-platform code will be the VNC launching code. That should be pretty simple to maintain!
That raises a problem because most people are behind NAT firewalls these days. Setting up port forwarding is a pain in the behind. I've used an app called Gitso before which allows people to connect to me and send their desktop to my screen (for tech support). Its VNC-based and all it really does is add another layer on top of the VNC connection so rather than me connecting to them, they connect to me. That makes the whole business of port forwarding a non-issue.
And once you've recorded everything, there's the final issue of syncing it all back together... Might not be so hard.
Well, Camtasia provides the solution to get your problem done. It can record the onscreen activity and also the webcam video and put them in the same player template. Another screen recorder DemoCreator can publish the screen recording as Flash movie, but can not record the webcam.

Categories