Yopu should be able to have two JARs, one encrypted and loaded by your custom ClassLoader, and the second unencrypted and loaded by the standard WebApp ClassLoader (ie placed in the WEB-INF/lib directory.
The second JAR can contain Interfaces implemented by you classes, and you can cast happily as long as you construct your custom ClassLoader as a child of the web application ClassLoader. In your
Servlets you can put ClassLoader loader = new CustomClassLoader(Servlet.class.getClassLoader()), but there may be a cleaner way to do that bit.
Usinf Interfaces rather than 'Master' classes is easier since you only need a type for the compiler, not actually any concrete implementations.